From: Daimona Eaytoy Date: Sat, 7 Sep 2019 13:44:01 +0000 (+0200) Subject: Remove dead properties X-Git-Tag: 1.34.0-rc.0~345 X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=23daef5c1839f5c7531c067cce763d1dabd38277 Remove dead properties *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 --- diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index a9fe25807b..f0e0077e43 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -293,7 +293,6 @@ class ApiMain extends ApiBase { $this->mEnableWrite = $enableWrite; $this->mCdnMaxAge = -1; // flag for executeActionWithErrorHandling() - $this->mCommit = false; } /** diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php index 981aeb017d..d5f5de3000 100644 --- a/includes/logging/LogPage.php +++ b/includes/logging/LogPage.php @@ -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, diff --git a/includes/specials/SpecialRecentChangesLinked.php b/includes/specials/SpecialRecentChangesLinked.php index 88656546e3..26f3665597 100644 --- a/includes/specials/SpecialRecentChangesLinked.php +++ b/includes/specials/SpecialRecentChangesLinked.php @@ -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 ) { diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index eff8889f43..83153ae01d 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -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' ] ); diff --git a/maintenance/mergeMessageFileList.php b/maintenance/mergeMessageFileList.php index 48a66661da..d78c5a0e4d 100644 --- a/maintenance/mergeMessageFileList.php +++ b/maintenance/mergeMessageFileList.php @@ -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" ); } }