Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Feb 7, 2025
1 parent 6defef1 commit 9490080
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions includes/Lister/Lister.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ public function formatList( $articles, $start, $count ) {
for ( $i = $start; $i < $start + $count; $i++ ) {
$article = $articles[$i];

if ( empty( $article ) || empty( $article->mTitle ) ) {
if ( !$article || empty( $article->mTitle ) ) {
continue;
}

Expand Down Expand Up @@ -671,7 +671,7 @@ public function formatItem( Article $article, $pageText = null ) {
$item .= ' . . [[User:' . $article->mContributor . '|' . $article->mContributor . " $article->mContrib]]";
}

if ( !empty( $article->mCategoryLinks ) ) {
if ( $article->mCategoryLinks ) {
$item .= ' . . <small>' . wfMessage( 'categories' ) . ': ' . implode( ' | ', $article->mCategoryLinks ) . '</small>';
}

Expand Down Expand Up @@ -835,7 +835,7 @@ protected function replaceTagParameters( $tag, Article $article ) {
* @return string
*/
protected function replaceTagCategory( $tag, Article $article ) {
if ( !empty( $article->mCategoryLinks ) ) {
if ( $article->mCategoryLinks ) {
$tag = str_replace( '%CATLIST%', implode( ', ', $article->mCategoryLinks ), $tag );
$tag = str_replace( '%CATBULLETS%', '* ' . implode( "\n* ", $article->mCategoryLinks ), $tag );
$tag = str_replace( '%CATNAMES%', implode( ', ', $article->mCategoryTexts ), $tag );
Expand Down Expand Up @@ -1027,7 +1027,7 @@ public function transcludePage( Article $article, &$filteredCount ) {
$septag = [];

// include whole article
if ( empty( $this->pageTextMatch ) || $this->pageTextMatch[0] == '*' ) {
if ( !$this->pageTextMatch || $this->pageTextMatch[0] == '*' ) {
$title = $article->mTitle->getPrefixedText();

if ( $this->getStyle() == self::LIST_USERFORMAT ) {
Expand All @@ -1048,12 +1048,12 @@ public function transcludePage( Article $article, &$filteredCount ) {
$updateRules = $this->getParameters()->getParameter( 'updaterules' );
$deleteRules = $this->getParameters()->getParameter( 'deleterules' );

if ( !empty( $updateRules ) ) {
if ( $updateRules ) {
$ruleOutput = UpdateArticle::updateArticleByRule( $title, $text, $updateRules );

// append update message to output
$pageText .= $ruleOutput;
} elseif ( !empty( $deleteRules ) ) {
} elseif ( $deleteRules ) {
$ruleOutput = UpdateArticle::deleteArticleByRule( $title, $text, $deleteRules );

// append delete message to output
Expand Down

0 comments on commit 9490080

Please sign in to comment.