Remove some more unused variables
authorSam Reed <reedy@users.mediawiki.org>
Thu, 19 Aug 2010 11:21:14 +0000 (11:21 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 19 Aug 2010 11:21:14 +0000 (11:21 +0000)
Remove srvus() from Parser, unused, and calling testSrvus wrongly

includes/Article.php
includes/Linker.php
includes/RevisionDelete.php
includes/db/DatabaseMssql.php
includes/installer/WebInstaller.php
includes/parser/Parser.php
includes/parser/Preprocessor_DOM.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialVersion.php
languages/Language.php
maintenance/updaters.inc

index 8ecc52b..6492129 100644 (file)
@@ -3186,7 +3186,6 @@ class Article {
                wfDebug( __METHOD__ . "\n" );
 
                $dbw = wfGetDB( DB_MASTER );
-               $ns = $this->mTitle->getNamespace();
                $t = $this->mTitle->getDBkey();
                $id = $id ? $id : $this->mTitle->getArticleID( GAID_FOR_UPDATE );
 
index af8332a..981b98c 100644 (file)
@@ -359,7 +359,9 @@ class Linker {
        function normaliseSpecialPage( Title $title ) {
                if ( $title->getNamespace() == NS_SPECIAL ) {
                        list( $name, $subpage ) = SpecialPage::resolveAliasWithSubpage( $title->getDBkey() );
-                       if ( !$name ) return $title;
+                       if ( !$name ) {
+                               return $title;
+                       }
                        $ret = SpecialPage::getTitleFor( $name, $subpage );
                        $ret->mFragment = $title->getFragment();
                        return $ret;
@@ -1911,7 +1913,6 @@ class Linker {
                if( $text === '' ) {
                        $text = $this->linkText( $title );
                }
-               $nt = $this->normaliseSpecialPage( $title );
 
                $ret = $this->link( $title, "$prefix$text$inside", array(),
                        wfCgiToArray( $query ), 'broken' ) . $trail;
index a4523e0..b87e158 100644 (file)
@@ -1212,7 +1212,6 @@ class RevDel_FileItem extends RevDel_Item {
                        ' (' . 
                        wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $this->file->getSize() ) ) . 
                        ')';
-               $pageLink = $this->getLink();
 
                return '<li>' . $this->getLink() . ' ' . $this->getUserTools() . ' ' .
                        $data . ' ' . $this->getComment(). '</li>';
index 0c8125f..67747d3 100644 (file)
@@ -814,7 +814,7 @@ class DatabaseMssql extends DatabaseBase {
        }
        
        function setup_database() {
-               global $wgVersion, $wgDBmwschema, $wgDBport, $wgDBuser;
+               global $wgVersion, $wgDBport, $wgDBuser;
 
                // Make sure that we can write to the correct schema
                $ctest = "mediawiki_test_table";
index bcef6f3..e3707ff 100644 (file)
@@ -610,8 +610,6 @@ class WebInstaller extends CoreInstaller {
                
                $text = wfMsgReal( $msg, $args, false, false, false );
                $html = $this->parse( $text, true );
-               $id = $this->helpId++;
-               $alt = wfMsg( 'help' );
 
                return
                        "<div class=\"config-help-wrapper\">\n" .
index 04a5e1d..ca949ed 100644 (file)
@@ -4629,7 +4629,6 @@ class Parser {
                }
 
                # Get the file
-               $imagename = $title->getDBkey();
                $file = wfFindFile( $title, array( 'time' => $time ) );
                # Get parameter map
                $handler = $file ? $file->getHandler() : false;
@@ -5132,10 +5131,6 @@ class Parser {
                return $text;
        }
 
-       function srvus( $text ) {
-               return $this->testSrvus( $text, $this->mOutputType );
-       }
-
        /**
         * strip/replaceVariables/unstrip for preprocessor regression testing
         */
index ae33901..84da6f0 100644 (file)
@@ -612,7 +612,7 @@ class Preprocessor_DOM implements Preprocessor {
                                        # do we still qualify for any callback with remaining count?
                                        $names = $rules[$piece->open]['names'];
                                        $skippedBraces = 0;
-                                       $enclosingAccum =& $accum;
+
                                        while ( $piece->count ) {
                                                if ( array_key_exists( $piece->count, $names ) ) {
                                                        $stack->push( $piece );
@@ -622,7 +622,6 @@ class Preprocessor_DOM implements Preprocessor {
                                                --$piece->count;
                                                $skippedBraces ++;
                                        }
-                                       $enclosingAccum .= str_repeat( $piece->open, $skippedBraces );
                                }
                                $flags = $stack->getFlags();
                                extract( $flags );
index e6b2602..8563f1b 100644 (file)
@@ -1143,7 +1143,6 @@ class UndeleteForm extends SpecialPage {
                if( $haveRevisions ) {
                        # The page's stored (deleted) history:
                        $wgOut->addHTML("<ul>");
-                       $target = urlencode( $this->mTarget );
                        $remaining = $revisions->numRows();
                        $earliestLiveTime = $this->mTargetObj->getEarliestRevTime();
 
@@ -1263,7 +1262,6 @@ class UndeleteForm extends SpecialPage {
                if( $this->mAllowed && $row->fa_storage_key ) {
                        $checkBox = Xml::check( "fileid" . $row->fa_id );
                        $key = urlencode( $row->fa_storage_key );
-                       $target = urlencode( $this->mTarget );
                        $pageLink = $this->getFileLink( $file, $this->getTitle(), $ts, $key, $sk );
                } else {
                        $checkBox = '';
index 147a09e..d195198 100644 (file)
@@ -622,7 +622,6 @@ class SpecialVersion extends SpecialPage {
                                $info['url']
                        );
                        
-                       $pathRelativeToRepo = substr( $info['url'], strlen( $info['repo-url'] ) );
                        $viewvc .= '/?pathrev=';
                        $viewvc .= urlencode( $info['checkout-rev'] );
                        $info['viewvc-url'] = $viewvc;
index 74a7fe0..b0b2a4c 100644 (file)
@@ -1614,7 +1614,6 @@ class Language {
                        }
                } else {
                        if ( $this->isMultibyte( $str ) ) {
-                               list( $wikiUpperChars ) = $this->getCaseMaps();
                                $x = $first ? '^' : '';
                                return preg_replace_callback(
                                        "/$x([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/",
@@ -1654,7 +1653,6 @@ class Language {
                        }
                } else {
                        if ( $this->isMultibyte( $str ) ) {
-                               list( , $wikiLowerChars ) = self::getCaseMaps();
                                $x = $first ? '^' : '';
                                return preg_replace_callback(
                                        "/$x([A-Z]|[\\xc0-\\xff][\\x80-\\xbf]*)/",
index 5fb727a..e8ae4c3 100644 (file)
@@ -1209,7 +1209,7 @@ END;
 }
 
 function do_postgres_updates() {
-       global $wgDatabase, $wgDBmwschema, $wgDBts2schema, $wgShowExceptionDetails, $wgDBuser;
+       global $wgDatabase, $wgDBmwschema, $wgDBts2schema, $wgDBuser;
 
        # # Gather version numbers in case we need them
        $version = $wgDatabase->getServerVersion(); # # long string