From: Sam Reed Date: Thu, 19 Aug 2010 11:21:14 +0000 (+0000) Subject: Remove some more unused variables X-Git-Tag: 1.31.0-rc.0~35445 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=721ecb6d2d12a7526ab822d139cdad6474560532;p=lhc%2Fweb%2Fwiklou.git Remove some more unused variables Remove srvus() from Parser, unused, and calling testSrvus wrongly --- diff --git a/includes/Article.php b/includes/Article.php index 8ecc52b92d..6492129de7 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ); diff --git a/includes/Linker.php b/includes/Linker.php index af8332aba1..981b98caf3 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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; diff --git a/includes/RevisionDelete.php b/includes/RevisionDelete.php index a4523e071d..b87e158751 100644 --- a/includes/RevisionDelete.php +++ b/includes/RevisionDelete.php @@ -1212,7 +1212,6 @@ class RevDel_FileItem extends RevDel_Item { ' (' . wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $this->file->getSize() ) ) . ')'; - $pageLink = $this->getLink(); return '
  • ' . $this->getLink() . ' ' . $this->getUserTools() . ' ' . $data . ' ' . $this->getComment(). '
  • '; diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index 0c8125f79e..67747d3277 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -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"; diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index bcef6f31f4..e3707ff1ed 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -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 "
    \n" . diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 04a5e1d336..ca949ed24f 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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 */ diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index ae33901146..84da6f0dc7 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -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 ); diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index e6b2602ac8..8563f1b931 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -1143,7 +1143,6 @@ class UndeleteForm extends SpecialPage { if( $haveRevisions ) { # The page's stored (deleted) history: $wgOut->addHTML("