r71289 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71288‎ | r71289 | r71290 >
Date:11:42, 19 August 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
More unused....
Modified paths:
  • /trunk/phase3/includes/FileDeleteForm.php (modified) (history)
  • /trunk/phase3/includes/QueryPage.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseIbm_db2.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstaller.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser_LinkHooks.php (modified) (history)
  • /trunk/phase3/maintenance/tests/UploadFromUrlTest.php (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/UploadFromUrlTest.php
@@ -216,7 +216,7 @@
217217 if ( $t->exists() ) {
218218 $file = wfFindFile( $name, array( 'ignoreRedirect' => true ) );
219219 $empty = "";
220 - $status = FileDeleteForm::doDelete( $t, $file, $empty, "none", true );
 220+ FileDeleteForm::doDelete( $t, $file, $empty, "none", true );
221221 $a = new Article ( $t );
222222 $a->doDeleteArticle( "testing" );
223223 }
Index: trunk/phase3/maintenance/updaters.inc
@@ -1212,7 +1212,6 @@
12131213 global $wgDatabase, $wgDBmwschema, $wgDBts2schema, $wgDBuser;
12141214
12151215 # # Gather version numbers in case we need them
1216 - $version = $wgDatabase->getServerVersion(); # # long string
12171216 $numver = $wgDatabase->numeric_version; # # X.Y e.g. 8.3
12181217
12191218 # Just in case their LocalSettings.php does not have this:
Index: trunk/phase3/includes/parser/Parser_LinkHooks.php
@@ -135,13 +135,7 @@
136136 wfProfileOut( __METHOD__.'-setup' );
137137 throw new MWException( __METHOD__.": \$this->mTitle is null\n" );
138138 }
139 - $nottalk = !$this->mTitle->isTalkPage();
140 -
141 - if($wgContLang->hasVariants()) {
142 - $selflink = $wgContLang->convertLinkToAllVariants($this->mTitle->getPrefixedText());
143 - } else {
144 - $selflink = array($this->mTitle->getPrefixedText());
145 - }
 139+
146140 wfProfileOut( __METHOD__.'-setup' );
147141
148142 $offset = 0;
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php
@@ -1076,10 +1076,8 @@
10771077 // assume success
10781078 $res = true;
10791079 // If we are not in a transaction, we need to be for savepoint trickery
1080 - $didbegin = 0;
10811080 if (! $this->mTrxLevel) {
10821081 $this->begin();
1083 - $didbegin = 1;
10841082 }
10851083
10861084 $sql = "INSERT INTO $table (" . implode( ',', $keys ) . ') VALUES ';
Index: trunk/phase3/includes/installer/WebInstaller.php
@@ -80,7 +80,6 @@
8181 */
8282 public $showSessionWarning = false;
8383
84 - public $helpId = 0;
8584 public $tabIndex = 1;
8685
8786 public $currentPageName;
@@ -607,7 +606,6 @@
608607 $args = func_get_args();
609608 array_shift( $args );
610609 $args = array_map( 'htmlspecialchars', $args );
611 -
612610 $text = wfMsgReal( $msg, $args, false, false, false );
613611 $html = $this->parse( $text, true );
614612
Index: trunk/phase3/includes/FileDeleteForm.php
@@ -253,7 +253,6 @@
254254 private function prepareMessage( $message ) {
255255 global $wgLang;
256256 if( $this->oldimage ) {
257 - $url = $this->file->getArchiveUrl( $this->oldimage );
258257 return wfMsgExt(
259258 "{$message}-old", # To ensure grep will find them: 'filedelete-intro-old', 'filedelete-nofile-old', 'filedelete-success-old'
260259 'parse',
Index: trunk/phase3/includes/QueryPage.php
@@ -228,8 +228,6 @@
229229 return false;
230230 }
231231
232 - $querycache = $dbr->tableName( 'querycache' );
233 -
234232 if ( $ignoreErrors ) {
235233 $ignoreW = $dbw->ignoreErrors( true );
236234 $ignoreR = $dbr->ignoreErrors( true );

Follow-up revisions

RevisionCommit summaryAuthorDate
r71402Follow up r71289. $wgContLang is now unused.platonides14:44, 21 August 2010
r71403Follow up r71289. getServerVersion() call was needed to initialise numeric_ve...platonides14:53, 21 August 2010

Comments

#Comment by Platonides (talk | contribs)   14:54, 21 August 2010
-	$version = $wgDatabase->getServerVersion(); # # long string
 	$numver = $wgDatabase->numeric_version; # # X.Y e.g. 8.3

This is wrong. The call to getServerVersion() initialises numeric_version. Fixed in r71403.

Status & tagging log