Remove dead properties
authorDaimona Eaytoy <daimona.wiki@gmail.com>
Sat, 7 Sep 2019 13:44:01 +0000 (15:44 +0200)
committerKrinkle <krinklemail@gmail.com>
Sat, 7 Sep 2019 16:34:55 +0000 (16:34 +0000)
*LogPage::timestamp was introduced with r4919 back in 2004, and is unused
since then.
*ApiMain::mCommit was introduced in r33133, then removed in r33381 but that
line was forgotten.
*SpecialRecentChangesLinked::mResultEmpty was introduced in r36682, then
removed at some point with this leftover.
*SpecialStatistics::hook, introduced in r54511 and unused since then.
*MergeMessageFileList::hasError introduced in Id4b16083435ef7f4fce31861c72889e664d07236
and removed in I3d9cf1d614dacaa91fb2092019ccf1d14d61ccab with a leftover

Change-Id: Ie15c148a3217ee8da62874840f3ef7739893f69e

includes/api/ApiMain.php
includes/logging/LogPage.php
includes/specials/SpecialRecentChangesLinked.php
includes/specials/SpecialStatistics.php
maintenance/mergeMessageFileList.php

index a9fe258..f0e0077 100644 (file)
@@ -293,7 +293,6 @@ class ApiMain extends ApiBase {
                $this->mEnableWrite = $enableWrite;
 
                $this->mCdnMaxAge = -1; // flag for executeActionWithErrorHandling()
-               $this->mCommit = false;
        }
 
        /**
index 981aeb0..d5f5de3 100644 (file)
@@ -94,8 +94,7 @@ class LogPage {
 
                $dbw = wfGetDB( DB_MASTER );
 
-               // @todo FIXME private/protected/public property?
-               $this->timestamp = $now = wfTimestampNow();
+               $now = wfTimestampNow();
                $data = [
                        'log_type' => $this->type,
                        'log_action' => $this->action,
index 8865654..26f3665 100644 (file)
@@ -229,13 +229,7 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                        $sql = $dbr->limitResult( $sql, $limit, false );
                }
 
-               $res = $dbr->query( $sql, __METHOD__ );
-
-               if ( $res->numRows() == 0 ) {
-                       $this->mResultEmpty = true;
-               }
-
-               return $res;
+               return $dbr->query( $sql, __METHOD__ );
        }
 
        function setTopText( FormOptions $opts ) {
index eff8889..83153ae 100644 (file)
@@ -47,7 +47,6 @@ class SpecialStatistics extends SpecialPage {
                $this->total = SiteStats::pages();
                $this->users = SiteStats::users();
                $this->activeUsers = SiteStats::activeUsers();
-               $this->hook = '';
 
                $text = Xml::openElement( 'table', [ 'class' => 'wikitable mw-statistics-table' ] );
 
index 48a6666..d78c5a0 100644 (file)
@@ -129,7 +129,6 @@ class MergeMessageFileList extends Maintenance {
                $files = [];
                $fileLines = file( $fileName );
                if ( $fileLines === false ) {
-                       $this->hasError = true;
                        $this->error( "Unable to open list file $fileName." );
 
                        return $files;
@@ -144,7 +143,6 @@ class MergeMessageFileList extends Maintenance {
                                if ( file_exists( $extension ) ) {
                                        $files[] = $extension;
                                } else {
-                                       $this->hasError = true;
                                        $this->error( "Extension {$extension} doesn't exist" );
                                }
                        }