r69976 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69975‎ | r69976 | r69977 >
Date:21:55, 26 July 2010
Author:reedy
Status:deferred (Comments)
Tags:
Comment:
Minor revert of CentralNotice.db.php

Add some braces

Remove more unused variables
Modified paths:
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php (modified) (history)
  • /trunk/extensions/CentralAuth/CentralAuthUser.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialMergeAccount.php (modified) (history)
  • /trunk/extensions/CentralNotice/CentralNotice.db.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/DynamicPageList/DPL.php (modified) (history)
  • /trunk/extensions/DynamicPageList/DPLMain.php (modified) (history)
  • /trunk/extensions/DynamicPageList/DPLSetup.php (modified) (history)
  • /trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Threads.php (modified) (history)
  • /trunk/extensions/SpamBlacklist/SpamBlacklist.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.body.php
@@ -1212,8 +1212,6 @@
12131213 global $wgScriptExtension;
12141214 global $wgOut;
12151215
1216 - $json = new Services_JSON();
1217 -
12181216 if ( !isset( $this->mPODPartners[$partner] ) ) {
12191217 $wgOut->showErrorPage( 'coll-invalid_podpartner_title', 'coll-invalid_podpartner_msg' );
12201218 return;
Index: trunk/extensions/LiquidThreads/classes/Threads.php
@@ -322,12 +322,12 @@
323323 $roundRowsAffected = 0;
324324
325325 // Fix wrong title.
326 - $res = $dbw->update( 'thread', $titleCond, $fixTitleCond,
 326+ $dbw->update( 'thread', $titleCond, $fixTitleCond,
327327 __METHOD__, $options );
328328 $roundRowsAffected += $dbw->affectedRows();
329329
330330 // Fix wrong ID
331 - $res = $dbw->update( 'thread', $idCond, $fixIdCond, __METHOD__, $options );
 331+ $dbw->update( 'thread', $idCond, $fixIdCond, __METHOD__, $options );
332332 $roundRowsAffected += $dbw->affectedRows();
333333
334334 $rowsAffected += $roundRowsAffected;
Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -1373,7 +1373,6 @@
13741374
13751375 function setSortKey( $k = null ) {
13761376 if ( is_null( $k ) ) {
1377 - $dbr = wfGetDB( DB_SLAVE );
13781377 $k = wfTimestamp( TS_MW );
13791378 }
13801379
Index: trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php
@@ -173,7 +173,6 @@
174174 }
175175
176176 // Thread conditions
177 - $threadConds = array();
178177 $threads = (array)$params['thread'];
179178 foreach ( $threads as $thread ) {
180179 $root = new Article( Title::newFromText( $thread ) );
Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -899,7 +899,6 @@
900900 $htmlOut = Xml::fieldset( wfMsg( "centralnotice-available-templates" ) );
901901 $htmlOut .= Xml::openElement( 'table', array( 'cellpadding' => 9 ) );
902902
903 -
904903 $htmlOut .= Xml::element( 'th', array( 'align' => 'left', 'width' => '5%' ),
905904 wfMsg ( "centralnotice-add" ) );
906905 $htmlOut .= Xml::element( 'th', array( 'align' => 'left', 'width' => '5%' ),
@@ -1173,7 +1172,7 @@
11741173 $dbw->begin();
11751174 $noticeId = $this->getNoticeId( $noticeName );
11761175 $templateId = $this->getTemplateId( $templateName );
1177 - $res = $dbw->delete( 'cn_assignments', array ( 'tmp_id' => $templateId, 'not_id' => $noticeId ) );
 1176+ $dbw->delete( 'cn_assignments', array ( 'tmp_id' => $templateId, 'not_id' => $noticeId ) );
11781177 $dbw->commit();
11791178 }
11801179
@@ -1235,7 +1234,7 @@
12361235 $dbw->begin();
12371236 $noticeId = $this->getNoticeId( $noticeName );
12381237 $templateId = $this->getTemplateId( $templateName );
1239 - $res = $dbw->update( 'cn_assignments',
 1238+ $dbw->update( 'cn_assignments',
12401239 array ( 'tmp_weight' => $weight ),
12411240 array(
12421241 'tmp_id' => $templateId,
Index: trunk/extensions/CentralNotice/CentralNotice.db.php
@@ -11,7 +11,7 @@
1212
1313 function CentralNoticeDB() {
1414 // Register special page
15 - parent::SpecialPage( 'CentralNotice' );
 15+ SpecialPage::SpecialPage( 'CentralNotice' );
1616
1717 // Internationalization
1818 wfLoadExtensionMessages( 'CentralNotice' );
Index: trunk/extensions/SpamBlacklist/SpamBlacklist.php
@@ -72,7 +72,9 @@
7373 function wfSpamBlacklistFilter( &$title, $text, $section, &$hookErr, $editSummary ) {
7474 $spamObj = wfSpamBlacklistObject();
7575 $ret = $spamObj->filter( $title, $text, $section, $editSummary );
76 - if ( $ret !== false ) EditPage::spamPage( $ret );
 76+ if ( $ret !== false ){
 77+ EditPage::spamPage( $ret );
 78+ }
7779 return ( $ret !== false );
7880 }
7981
@@ -90,7 +92,9 @@
9193 $spamObj = wfSpamBlacklistObject();
9294 $title = $editPage->mArticle->getTitle();
9395 $ret = $spamObj->filter( $title, $text, '', $editSummary, $editPage );
94 - if ( $ret !== false ) $editPage->spamPage( $ret );
 96+ if ( $ret !== false ){
 97+ $editPage->spamPage( $ret );
 98+ }
9599 // Return convention for hooks is the inverse of $wgFilterCallback
96100 return ( $ret === false );
97101 }
Index: trunk/extensions/CentralAuth/CentralAuthUser.php
@@ -865,8 +865,6 @@
866866 $status->failCount++;
867867 }
868868
869 - $invalidCount = count( $list ) - count( $valid );
870 - $missingCount = 0;
871869 $dbcw = self::getCentralDB();
872870 $password = $this->getPassword();
873871
@@ -1574,7 +1572,6 @@
15751573 $result->free();
15761574
15771575 // And while we're in here, look for user blocks :D
1578 - $blocks = array();
15791576 $result = $db->select( 'ipblocks',
15801577 array( 'ipb_expiry', 'ipb_reason' ),
15811578 array( 'ipb_user' => $data['id'] ),
Index: trunk/extensions/CentralAuth/SpecialMergeAccount.php
@@ -225,10 +225,7 @@
226226 throw new MWException( "Submission error -- invalid input" );
227227 }
228228
229 - $home = false;
230 - $attached = array();
231 - $unattached = array();
232 - $ok = $globalUser->storeAndMigrate( $passwords );
 229+ $globalUser->storeAndMigrate( $passwords );
233230 $this->clearWorkingPasswords();
234231
235232 $this->showCleanupForm();
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php
@@ -145,8 +145,6 @@
146146 }
147147
148148 function getQueryInfo() {
149 - $dbr = wfGetDB( DB_SLAVE );
150 - $abuse_filter = $dbr->tableName( 'abuse_filter' );
151149 return array(
152150 'tables' => array( 'abuse_filter' ),
153151 'fields' => array(
Index: trunk/extensions/DynamicPageList/DPL.php
@@ -1274,7 +1274,7 @@
12751275 if ( $noMatches <= 0 ) {
12761276 return $text;
12771277 }
1278 - $rText = '';
 1278+
12791279 $beginSubst = - 1;
12801280 $endSubst = - 1;
12811281 $posInsertAt = 0;
Index: trunk/extensions/DynamicPageList/DPLSetup.php
@@ -1321,7 +1321,6 @@
13221322 $heading = ' ', $maxLength = - 1, $page = '?page?', $link = 'default',
13231323 $trim = false
13241324 ) {
1325 - $arg_list = func_get_args();
13261325 $output = DPLInclude::extractHeadingFromText(
13271326 $parser, $page, '?title?', $text, $heading, '', $sectionHeading,
13281327 true, $maxLength, $link, $trim
@@ -1330,7 +1329,6 @@
13311330 }
13321331
13331332 public static function dplMatrixParserFunction( &$parser, $name, $yes, $no, $flip, $matrix ) {
1334 - $arg_list = func_get_args();
13351333 $lines = explode( "\n", $matrix );
13361334 $m = array();
13371335 $sources = array();
Index: trunk/extensions/DynamicPageList/DPLMain.php
@@ -2025,7 +2025,6 @@
20262026 $sSqlCond_MaxCat = '';
20272027 $sSqlWhere = ' WHERE 1=1 ';
20282028 $sSqlSelPage = ''; // initial page for selection
2029 - $sSqlSelectPageTouched = '';
20302029
20312030 // normally we create a result of normal pages, but when goal=categories is set, we create a list of categories
20322031 // as this conflicts with some options we need to avoid producing incoorect SQl code

Comments

#Comment by Werdna (talk | contribs)   10:24, 28 July 2010

CodeReview takes just the first line of your commit to display in the rev list. This should probably accurately summarize the commit.

Status & tagging log