From: Sam Reed Date: Fri, 13 Aug 2010 20:58:16 +0000 (+0000) Subject: Remove some unused variables X-Git-Tag: 1.31.0-rc.0~35501 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=380b6725d5b0c127bd8d62af8904f6787905aca8;p=lhc%2Fweb%2Fwiklou.git Remove some unused variables Move variable in languages/classes/LanguageKu.php into commented code (used in comment) --- diff --git a/includes/ConfEditor.php b/includes/ConfEditor.php index 9a13b45b91..a1a3431c20 100644 --- a/includes/ConfEditor.php +++ b/includes/ConfEditor.php @@ -836,7 +836,6 @@ class ConfEditor { * not call except from popPath() or nextPath(). */ function endPath() { - $i = count( $this->pathStack ) - 1; $key = ''; foreach ( $this->pathStack as $pathInfo ) { if ( $key !== '' ) { diff --git a/includes/ImagePage.php b/includes/ImagePage.php index ee36ee8574..c760f1ed7a 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -437,7 +437,6 @@ class ImagePage extends Article { 'onchange' => 'document.pageselector.submit();', ); - $option = array(); for ( $i = 1; $i <= $count; $i++ ) { $options[] = Xml::option( $wgLang->formatNum( $i ), $i, $i == $page ); } @@ -530,7 +529,6 @@ EOT $wrap = "
\n$1\n
\n"; $repo = $this->img->getRepo()->getDisplayName(); - $msg = ''; if ( $descUrl && $descText && wfMsgNoTrans( 'sharedupload-desc-here' ) !== '-' ) { $wgOut->wrapWikiMsg( $wrap, array( 'sharedupload-desc-here', $repo, $descUrl ) ); } elseif ( $descUrl && wfMsgNoTrans( 'sharedupload-desc-there' ) !== '-' ) { diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index cfbda57d38..122a11e733 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -749,7 +749,7 @@ class Sanitizer { // Decode escape sequences and line continuation // See the grammar in the CSS 2 spec, appendix D. - static $decodeRegex, $reencodeTable; + static $decodeRegex; if ( !$decodeRegex ) { $space = '[\\x20\\t\\r\\n\\f]'; $nl = '(?:\\n|\\r\\n|\\r|\\f)'; diff --git a/includes/db/DatabaseIbm_db2.php b/includes/db/DatabaseIbm_db2.php index 3987df8efc..f54c970866 100644 --- a/includes/db/DatabaseIbm_db2.php +++ b/includes/db/DatabaseIbm_db2.php @@ -1101,7 +1101,6 @@ EOF; $this->begin(); if ( !$ignore ) { - $first = true; foreach ( $args as $row ) { // insert each row into the database $res = $res & $this->execute($stmt, $row); diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index 3b41397459..0040fe9e15 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -217,7 +217,6 @@ class LoadBalancer { $this->getLoadMonitor()->scaleLoads( $nonErrorLoads, $group, $wiki ); $i = false; - $found = false; $laggedSlaveMode = false; # First try quickly looking through the available servers for a server that diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 251f938e45..ba13d2d789 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -628,7 +628,6 @@ class CoreParserFunctions { * Parser function to extension tag adaptor */ public static function tagObj( $parser, $frame, $args ) { - $xpath = false; if ( !count( $args ) ) { return ''; } diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index 5f536debda..d8eff78b00 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -853,7 +853,6 @@ class PPFrame_Hash implements PPFrame { $title = $this->title; } if ( $args !== false ) { - $xpath = false; if ( $args instanceof PPNode_Hash_Array ) { $args = $args->value; } elseif ( !is_array( $args ) ) { diff --git a/includes/specials/SpecialIpblocklist.php b/includes/specials/SpecialIpblocklist.php index 7e89d341a0..5cfa34a04f 100644 --- a/includes/specials/SpecialIpblocklist.php +++ b/includes/specials/SpecialIpblocklist.php @@ -270,7 +270,6 @@ class IPUnblockForm extends SpecialPage { } $conds = array(); - $matches = array(); // Is user allowed to see all the blocks? if ( !$wgUser->isAllowed( 'hideuser' ) ) $conds['ipb_deleted'] = 0; diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index 75935ec232..1dcb42b2b6 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -455,7 +455,6 @@ class MergeHistoryPager extends ReverseChronologicalPager { } function formatRow( $row ) { - $block = new Block; return $this->mForm->formatRevisionRow( $row ); } diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 28f125fb14..af0dddafe5 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -225,7 +225,6 @@ class LanguageConverter { */ protected function getHeaderVariant() { global $wgRequest; - $ret = null; if ( $this->mHeaderVariant ) { return $this->mHeaderVariant; @@ -544,7 +543,6 @@ class LanguageConverter { $out = ''; $length = strlen( $text ); while ( $startPos < $length ) { - $m = false; $pos = strpos( $text, '-{', $startPos ); if ( $pos === false ) { @@ -1280,7 +1278,6 @@ class ConverterRule { $variant = $this->mConverter->getPreferredVariant(); } - $variants = $this->mConverter->mVariants; $this->parseFlags(); $flags = $this->mFlags; diff --git a/languages/classes/LanguageKu.php b/languages/classes/LanguageKu.php index bd1e0aaaec..d3ab6722af 100644 --- a/languages/classes/LanguageKu.php +++ b/languages/classes/LanguageKu.php @@ -180,10 +180,8 @@ class KuConverter extends LanguageConverter { * - ommiting roman numbers */ function translate( $text, $toVariant ) { - $breaks = '[^\w\x80-\xff]'; - /* From Kazakh interface, maybe we need it later - * + $breaks = '[^\w\x80-\xff]'; // regexp for roman numbers $roman = 'M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})'; $roman = ''; diff --git a/maintenance/importUseModWiki.php b/maintenance/importUseModWiki.php index e8463e2e5e..52a3d0e3b3 100644 --- a/maintenance/importUseModWiki.php +++ b/maintenance/importUseModWiki.php @@ -199,8 +199,6 @@ function checkUserCache( $name, $host ) function importPage( $title ) { - global $usercache; - echo "\n\n"; $page = fetchPage( $title ); diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 0d9a99ae5b..88ef54ff00 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -335,7 +335,6 @@ class ParserTest { $user = new User(); $options = ParserOptions::newFromUser( $user ); - $m = array(); if ( isset( $opts['title'] ) ) { $titleText = $opts['title']; } @@ -349,7 +348,6 @@ class ParserTest { $parser = $this->getParser( $preprocessor ); $title = Title::newFromText( $titleText ); - $matches = array(); if ( isset( $opts['pst'] ) ) { $out = $parser->preSaveTransform( $input, $title, $user, $options ); } elseif ( isset( $opts['msg'] ) ) { diff --git a/maintenance/populateLogSearch.php b/maintenance/populateLogSearch.php index 374169279c..4b985b5d42 100644 --- a/maintenance/populateLogSearch.php +++ b/maintenance/populateLogSearch.php @@ -56,7 +56,6 @@ class PopulateLogSearch extends Maintenance { $this->output( "...doing log_id from $blockStart to $blockEnd\n" ); $cond = "log_id BETWEEN $blockStart AND $blockEnd"; $res = $db->select( 'logging', '*', $cond, __FUNCTION__ ); - $batch = array(); foreach ( $res as $row ) { // RevisionDelete logs - revisions if ( LogEventsList::typeAction( $row, $delTypes, 'revision' ) ) { diff --git a/maintenance/rebuildImages.php b/maintenance/rebuildImages.php index 578812450a..9cfec70059 100644 --- a/maintenance/rebuildImages.php +++ b/maintenance/rebuildImages.php @@ -171,8 +171,6 @@ class ImageBuilder extends FiveUpgrade { } function addMissingImage( $filename, $fullpath ) { - $fname = 'ImageBuilder::addMissingImage'; - $timestamp = $this->dbw->timestamp( filemtime( $fullpath ) ); global $wgContLang; diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php index 3174b04b98..73c21d576a 100644 --- a/maintenance/storage/fixBug20757.php +++ b/maintenance/storage/fixBug20757.php @@ -130,7 +130,6 @@ class FixBug20757 extends Maintenance { } // Process the stubs - $stubsToFix = array(); foreach ( $stubs as $primaryId => $stub ) { $secondaryId = $stub['secondaryId']; if ( !isset( $trackedBlobs[$secondaryId] ) ) { diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index c7df144f83..a600a917dc 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -271,7 +271,6 @@ class SkinCologneBlue extends Skin { $s .= $this->menuHead( 'qbmyoptions' ); if ( $wgUser->isLoggedIn() ) { - $name = $wgUser->getName(); $tl = $this->link( $wgUser->getTalkPage(), wfMsg( 'mytalk' ), diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php index 1e4f3cdc8e..5bada29b49 100644 --- a/skins/Nostalgia.php +++ b/skins/Nostalgia.php @@ -73,7 +73,6 @@ class SkinNostalgia extends Skin { if ( $wgUser->isAnon() ) { $s .= $sep . $this->specialLink( 'userlogin' ); } else { - $name = $wgUser->getName(); /* show user page and user talk links */ $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) ); $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );