Remove some unused variables
authorSam Reed <reedy@users.mediawiki.org>
Fri, 13 Aug 2010 20:58:16 +0000 (20:58 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 13 Aug 2010 20:58:16 +0000 (20:58 +0000)
Move variable in languages/classes/LanguageKu.php into commented code (used in comment)

18 files changed:
includes/ConfEditor.php
includes/ImagePage.php
includes/Sanitizer.php
includes/db/DatabaseIbm_db2.php
includes/db/LoadBalancer.php
includes/parser/CoreParserFunctions.php
includes/parser/Preprocessor_Hash.php
includes/specials/SpecialIpblocklist.php
includes/specials/SpecialMergeHistory.php
languages/LanguageConverter.php
languages/classes/LanguageKu.php
maintenance/importUseModWiki.php
maintenance/parserTests.inc
maintenance/populateLogSearch.php
maintenance/rebuildImages.php
maintenance/storage/fixBug20757.php
skins/CologneBlue.php
skins/Nostalgia.php

index 9a13b45..a1a3431 100644 (file)
@@ -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 !== '' ) {
index ee36ee8..c760f1e 100644 (file)
@@ -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 = "<div class=\"sharedUploadNotice\">\n$1\n</div>\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' ) !== '-' ) {
index cfbda57..122a11e 100644 (file)
@@ -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)';
index 3987df8..f54c970 100644 (file)
@@ -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);
index 3b41397..0040fe9 100644 (file)
@@ -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
index 251f938..ba13d2d 100644 (file)
@@ -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 '';
                }
index 5f536de..d8eff78 100644 (file)
@@ -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 ) ) {
index 7e89d34..5cfa34a 100644 (file)
@@ -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;
index 75935ec..1dcb42b 100644 (file)
@@ -455,7 +455,6 @@ class MergeHistoryPager extends ReverseChronologicalPager {
        }
 
        function formatRow( $row ) {
-               $block = new Block;
                return $this->mForm->formatRevisionRow( $row );
        }
 
index 28f125f..af0ddda 100644 (file)
@@ -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;
 
index bd1e0aa..d3ab672 100644 (file)
@@ -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 = '';
index e8463e2..52a3d0e 100644 (file)
@@ -199,8 +199,6 @@ function checkUserCache( $name, $host )
 
 function importPage( $title )
 {
-       global $usercache;
-
        echo "\n<!-- Importing page " . xmlCommentSafe( $title ) . " -->\n";
        $page = fetchPage( $title );
 
index 0d9a99a..88ef54f 100644 (file)
@@ -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'] ) ) {
index 3741692..4b985b5 100644 (file)
@@ -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' ) ) {
index 5788124..9cfec70 100644 (file)
@@ -171,8 +171,6 @@ class ImageBuilder extends FiveUpgrade {
        }
 
        function addMissingImage( $filename, $fullpath ) {
-               $fname = 'ImageBuilder::addMissingImage';
-
                $timestamp = $this->dbw->timestamp( filemtime( $fullpath ) );
 
                global $wgContLang;
index 3174b04..73c21d5 100644 (file)
@@ -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] ) ) {
index c7df144..a600a91 100644 (file)
@@ -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' ),
index 1e4f3cd..5bada29 100644 (file)
@@ -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' ) );