r71286 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71285‎ | r71286 | r71287 >
Date:11:21, 19 August 2010
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Remove some more unused variables

Remove srvus() from Parser, unused, and calling testSrvus wrongly
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/RevisionDelete.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseMssql.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstaller.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/includes/parser/Preprocessor_DOM.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -4629,7 +4629,6 @@
46304630 }
46314631
46324632 # Get the file
4633 - $imagename = $title->getDBkey();
46344633 $file = wfFindFile( $title, array( 'time' => $time ) );
46354634 # Get parameter map
46364635 $handler = $file ? $file->getHandler() : false;
@@ -5132,10 +5131,6 @@
51335132 return $text;
51345133 }
51355134
5136 - function srvus( $text ) {
5137 - return $this->testSrvus( $text, $this->mOutputType );
5138 - }
5139 -
51405135 /**
51415136 * strip/replaceVariables/unstrip for preprocessor regression testing
51425137 */
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php
@@ -612,7 +612,7 @@
613613 # do we still qualify for any callback with remaining count?
614614 $names = $rules[$piece->open]['names'];
615615 $skippedBraces = 0;
616 - $enclosingAccum =& $accum;
 616+
617617 while ( $piece->count ) {
618618 if ( array_key_exists( $piece->count, $names ) ) {
619619 $stack->push( $piece );
@@ -622,7 +622,6 @@
623623 --$piece->count;
624624 $skippedBraces ++;
625625 }
626 - $enclosingAccum .= str_repeat( $piece->open, $skippedBraces );
627626 }
628627 $flags = $stack->getFlags();
629628 extract( $flags );
Index: trunk/phase3/includes/Linker.php
@@ -359,7 +359,9 @@
360360 function normaliseSpecialPage( Title $title ) {
361361 if ( $title->getNamespace() == NS_SPECIAL ) {
362362 list( $name, $subpage ) = SpecialPage::resolveAliasWithSubpage( $title->getDBkey() );
363 - if ( !$name ) return $title;
 363+ if ( !$name ) {
 364+ return $title;
 365+ }
364366 $ret = SpecialPage::getTitleFor( $name, $subpage );
365367 $ret->mFragment = $title->getFragment();
366368 return $ret;
@@ -1911,7 +1913,6 @@
19121914 if( $text === '' ) {
19131915 $text = $this->linkText( $title );
19141916 }
1915 - $nt = $this->normaliseSpecialPage( $title );
19161917
19171918 $ret = $this->link( $title, "$prefix$text$inside", array(),
19181919 wfCgiToArray( $query ), 'broken' ) . $trail;
Index: trunk/phase3/includes/db/DatabaseMssql.php
@@ -814,7 +814,7 @@
815815 }
816816
817817 function setup_database() {
818 - global $wgVersion, $wgDBmwschema, $wgDBport, $wgDBuser;
 818+ global $wgVersion, $wgDBport, $wgDBuser;
819819
820820 // Make sure that we can write to the correct schema
821821 $ctest = "mediawiki_test_table";
Index: trunk/phase3/includes/Article.php
@@ -3186,7 +3186,6 @@
31873187 wfDebug( __METHOD__ . "\n" );
31883188
31893189 $dbw = wfGetDB( DB_MASTER );
3190 - $ns = $this->mTitle->getNamespace();
31913190 $t = $this->mTitle->getDBkey();
31923191 $id = $id ? $id : $this->mTitle->getArticleID( GAID_FOR_UPDATE );
31933192
Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -622,7 +622,6 @@
623623 $info['url']
624624 );
625625
626 - $pathRelativeToRepo = substr( $info['url'], strlen( $info['repo-url'] ) );
627626 $viewvc .= '/?pathrev=';
628627 $viewvc .= urlencode( $info['checkout-rev'] );
629628 $info['viewvc-url'] = $viewvc;
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -1143,7 +1143,6 @@
11441144 if( $haveRevisions ) {
11451145 # The page's stored (deleted) history:
11461146 $wgOut->addHTML("<ul>");
1147 - $target = urlencode( $this->mTarget );
11481147 $remaining = $revisions->numRows();
11491148 $earliestLiveTime = $this->mTargetObj->getEarliestRevTime();
11501149
@@ -1263,7 +1262,6 @@
12641263 if( $this->mAllowed && $row->fa_storage_key ) {
12651264 $checkBox = Xml::check( "fileid" . $row->fa_id );
12661265 $key = urlencode( $row->fa_storage_key );
1267 - $target = urlencode( $this->mTarget );
12681266 $pageLink = $this->getFileLink( $file, $this->getTitle(), $ts, $key, $sk );
12691267 } else {
12701268 $checkBox = '';
Index: trunk/phase3/includes/RevisionDelete.php
@@ -1212,7 +1212,6 @@
12131213 ' (' .
12141214 wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $this->file->getSize() ) ) .
12151215 ')';
1216 - $pageLink = $this->getLink();
12171216
12181217 return '<li>' . $this->getLink() . ' ' . $this->getUserTools() . ' ' .
12191218 $data . ' ' . $this->getComment(). '</li>';
Index: trunk/phase3/includes/installer/WebInstaller.php
@@ -610,8 +610,6 @@
611611
612612 $text = wfMsgReal( $msg, $args, false, false, false );
613613 $html = $this->parse( $text, true );
614 - $id = $this->helpId++;
615 - $alt = wfMsg( 'help' );
616614
617615 return
618616 "<div class=\"config-help-wrapper\">\n" .
Index: trunk/phase3/languages/Language.php
@@ -1614,7 +1614,6 @@
16151615 }
16161616 } else {
16171617 if ( $this->isMultibyte( $str ) ) {
1618 - list( $wikiUpperChars ) = $this->getCaseMaps();
16191618 $x = $first ? '^' : '';
16201619 return preg_replace_callback(
16211620 "/$x([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/",
@@ -1654,7 +1653,6 @@
16551654 }
16561655 } else {
16571656 if ( $this->isMultibyte( $str ) ) {
1658 - list( , $wikiLowerChars ) = self::getCaseMaps();
16591657 $x = $first ? '^' : '';
16601658 return preg_replace_callback(
16611659 "/$x([A-Z]|[\\xc0-\\xff][\\x80-\\xbf]*)/",
Index: trunk/phase3/maintenance/updaters.inc
@@ -1209,7 +1209,7 @@
12101210 }
12111211
12121212 function do_postgres_updates() {
1213 - global $wgDatabase, $wgDBmwschema, $wgDBts2schema, $wgShowExceptionDetails, $wgDBuser;
 1213+ global $wgDatabase, $wgDBmwschema, $wgDBts2schema, $wgDBuser;
12141214
12151215 # # Gather version numbers in case we need them
12161216 $version = $wgDatabase->getServerVersion(); # # long string

Follow-up revisions

RevisionCommit summaryAuthorDate
r71372Revert the change to Preprocessor_DOM.php of r71286....platonides18:03, 20 August 2010

Comments

#Comment by Platonides (talk | contribs)   17:58, 20 August 2010

Breaks the "Link with 3 brackets" parsertest. Something wasn't so unused...

#Comment by Platonides (talk | contribs)   18:04, 20 August 2010

Fixed in r71372.

Status & tagging log