r71047 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71046‎ | r71047 | r71048 >
Date:20:58, 13 August 2010
Author:reedy
Status:ok
Tags:
Comment:
Remove some unused variables

Move variable in languages/classes/LanguageKu.php into commented code (used in comment)
Modified paths:
  • /trunk/phase3/includes/ConfEditor.php (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/includes/Sanitizer.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseIbm_db2.php (modified) (history)
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)
  • /trunk/phase3/includes/parser/Preprocessor_Hash.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialIpblocklist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)
  • /trunk/phase3/languages/classes/LanguageKu.php (modified) (history)
  • /trunk/phase3/maintenance/importUseModWiki.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)
  • /trunk/phase3/maintenance/populateLogSearch.php (modified) (history)
  • /trunk/phase3/maintenance/rebuildImages.php (modified) (history)
  • /trunk/phase3/maintenance/storage/fixBug20757.php (modified) (history)
  • /trunk/phase3/skins/CologneBlue.php (modified) (history)
  • /trunk/phase3/skins/Nostalgia.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/storage/fixBug20757.php
@@ -130,7 +130,6 @@
131131 }
132132
133133 // Process the stubs
134 - $stubsToFix = array();
135134 foreach ( $stubs as $primaryId => $stub ) {
136135 $secondaryId = $stub['secondaryId'];
137136 if ( !isset( $trackedBlobs[$secondaryId] ) ) {
Index: trunk/phase3/maintenance/parserTests.inc
@@ -335,7 +335,6 @@
336336 $user = new User();
337337 $options = ParserOptions::newFromUser( $user );
338338
339 - $m = array();
340339 if ( isset( $opts['title'] ) ) {
341340 $titleText = $opts['title'];
342341 }
@@ -349,7 +348,6 @@
350349 $parser = $this->getParser( $preprocessor );
351350 $title = Title::newFromText( $titleText );
352351
353 - $matches = array();
354352 if ( isset( $opts['pst'] ) ) {
355353 $out = $parser->preSaveTransform( $input, $title, $user, $options );
356354 } elseif ( isset( $opts['msg'] ) ) {
Index: trunk/phase3/maintenance/importUseModWiki.php
@@ -199,8 +199,6 @@
200200
201201 function importPage( $title )
202202 {
203 - global $usercache;
204 -
205203 echo "\n<!-- Importing page " . xmlCommentSafe( $title ) . " -->\n";
206204 $page = fetchPage( $title );
207205
Index: trunk/phase3/maintenance/rebuildImages.php
@@ -171,8 +171,6 @@
172172 }
173173
174174 function addMissingImage( $filename, $fullpath ) {
175 - $fname = 'ImageBuilder::addMissingImage';
176 -
177175 $timestamp = $this->dbw->timestamp( filemtime( $fullpath ) );
178176
179177 global $wgContLang;
Index: trunk/phase3/maintenance/populateLogSearch.php
@@ -56,7 +56,6 @@
5757 $this->output( "...doing log_id from $blockStart to $blockEnd\n" );
5858 $cond = "log_id BETWEEN $blockStart AND $blockEnd";
5959 $res = $db->select( 'logging', '*', $cond, __FUNCTION__ );
60 - $batch = array();
6160 foreach ( $res as $row ) {
6261 // RevisionDelete logs - revisions
6362 if ( LogEventsList::typeAction( $row, $delTypes, 'revision' ) ) {
Index: trunk/phase3/skins/CologneBlue.php
@@ -271,7 +271,6 @@
272272
273273 $s .= $this->menuHead( 'qbmyoptions' );
274274 if ( $wgUser->isLoggedIn() ) {
275 - $name = $wgUser->getName();
276275 $tl = $this->link(
277276 $wgUser->getTalkPage(),
278277 wfMsg( 'mytalk' ),
Index: trunk/phase3/skins/Nostalgia.php
@@ -73,7 +73,6 @@
7474 if ( $wgUser->isAnon() ) {
7575 $s .= $sep . $this->specialLink( 'userlogin' );
7676 } else {
77 - $name = $wgUser->getName();
7877 /* show user page and user talk links */
7978 $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
8079 $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
Index: trunk/phase3/includes/parser/Preprocessor_Hash.php
@@ -853,7 +853,6 @@
854854 $title = $this->title;
855855 }
856856 if ( $args !== false ) {
857 - $xpath = false;
858857 if ( $args instanceof PPNode_Hash_Array ) {
859858 $args = $args->value;
860859 } elseif ( !is_array( $args ) ) {
Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -628,7 +628,6 @@
629629 * Parser function to extension tag adaptor
630630 */
631631 public static function tagObj( $parser, $frame, $args ) {
632 - $xpath = false;
633632 if ( !count( $args ) ) {
634633 return '';
635634 }
Index: trunk/phase3/includes/ImagePage.php
@@ -437,7 +437,6 @@
438438 'onchange' => 'document.pageselector.submit();',
439439 );
440440
441 - $option = array();
442441 for ( $i = 1; $i <= $count; $i++ ) {
443442 $options[] = Xml::option( $wgLang->formatNum( $i ), $i, $i == $page );
444443 }
@@ -530,7 +529,6 @@
531530 $wrap = "<div class=\"sharedUploadNotice\">\n$1\n</div>\n";
532531 $repo = $this->img->getRepo()->getDisplayName();
533532
534 - $msg = '';
535533 if ( $descUrl && $descText && wfMsgNoTrans( 'sharedupload-desc-here' ) !== '-' ) {
536534 $wgOut->wrapWikiMsg( $wrap, array( 'sharedupload-desc-here', $repo, $descUrl ) );
537535 } elseif ( $descUrl && wfMsgNoTrans( 'sharedupload-desc-there' ) !== '-' ) {
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php
@@ -1101,7 +1101,6 @@
11021102 $this->begin();
11031103
11041104 if ( !$ignore ) {
1105 - $first = true;
11061105 foreach ( $args as $row ) {
11071106 // insert each row into the database
11081107 $res = $res & $this->execute($stmt, $row);
Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -217,7 +217,6 @@
218218 $this->getLoadMonitor()->scaleLoads( $nonErrorLoads, $group, $wiki );
219219
220220 $i = false;
221 - $found = false;
222221 $laggedSlaveMode = false;
223222
224223 # First try quickly looking through the available servers for a server that
Index: trunk/phase3/includes/Sanitizer.php
@@ -749,7 +749,7 @@
750750
751751 // Decode escape sequences and line continuation
752752 // See the grammar in the CSS 2 spec, appendix D.
753 - static $decodeRegex, $reencodeTable;
 753+ static $decodeRegex;
754754 if ( !$decodeRegex ) {
755755 $space = '[\\x20\\t\\r\\n\\f]';
756756 $nl = '(?:\\n|\\r\\n|\\r|\\f)';
Index: trunk/phase3/includes/ConfEditor.php
@@ -836,7 +836,6 @@
837837 * not call except from popPath() or nextPath().
838838 */
839839 function endPath() {
840 - $i = count( $this->pathStack ) - 1;
841840 $key = '';
842841 foreach ( $this->pathStack as $pathInfo ) {
843842 if ( $key !== '' ) {
Index: trunk/phase3/includes/specials/SpecialIpblocklist.php
@@ -270,7 +270,6 @@
271271 }
272272
273273 $conds = array();
274 - $matches = array();
275274 // Is user allowed to see all the blocks?
276275 if ( !$wgUser->isAllowed( 'hideuser' ) )
277276 $conds['ipb_deleted'] = 0;
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -455,7 +455,6 @@
456456 }
457457
458458 function formatRow( $row ) {
459 - $block = new Block;
460459 return $this->mForm->formatRevisionRow( $row );
461460 }
462461
Index: trunk/phase3/languages/LanguageConverter.php
@@ -225,7 +225,6 @@
226226 */
227227 protected function getHeaderVariant() {
228228 global $wgRequest;
229 - $ret = null;
230229
231230 if ( $this->mHeaderVariant ) {
232231 return $this->mHeaderVariant;
@@ -544,7 +543,6 @@
545544 $out = '';
546545 $length = strlen( $text );
547546 while ( $startPos < $length ) {
548 - $m = false;
549547 $pos = strpos( $text, '-{', $startPos );
550548
551549 if ( $pos === false ) {
@@ -1280,7 +1278,6 @@
12811279 $variant = $this->mConverter->getPreferredVariant();
12821280 }
12831281
1284 - $variants = $this->mConverter->mVariants;
12851282 $this->parseFlags();
12861283 $flags = $this->mFlags;
12871284
Index: trunk/phase3/languages/classes/LanguageKu.php
@@ -180,10 +180,8 @@
181181 * - ommiting roman numbers
182182 */
183183 function translate( $text, $toVariant ) {
184 - $breaks = '[^\w\x80-\xff]';
185 -
186184 /* From Kazakh interface, maybe we need it later
187 - *
 185+ $breaks = '[^\w\x80-\xff]';
188186 // regexp for roman numbers
189187 $roman = 'M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})';
190188 $roman = '';

Status & tagging log