r77304 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77303‎ | r77304 | r77305 >
Date:22:24, 25 November 2010
Author:reedy
Status:ok
Tags:
Comment:
More reversion of r77297, 1 of 2 commits to keep it readable in CR (hopefully)
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/ConfEditor.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseIbm_db2.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseMssql.php (modified) (history)
  • /trunk/phase3/includes/diff/WikiDiff.php (modified) (history)
  • /trunk/phase3/includes/installer/DatabaseInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlInstaller.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /trunk/phase3/includes/installer/OracleInstaller.php (modified) (history)
  • /trunk/phase3/includes/media/SVG.php (modified) (history)
  • /trunk/phase3/includes/parser/LinkHolderArray.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/WikiDiff.php
@@ -313,7 +313,7 @@
314314 }
315315 $matches = $ymatches[$line];
316316 reset($matches);
317 - while ( list( $junk, $y ) = each( $matches ) ) {
 317+ while ( list( , $y ) = each( $matches ) ) {
318318 if ( empty( $this->in_seq[$y] ) ) {
319319 $k = $this->_lcs_pos( $y );
320320 assert( $k > 0 );
@@ -321,7 +321,7 @@
322322 break;
323323 }
324324 }
325 - while (list ( /* $junk */, $y) = each($matches)) {
 325+ while (list ( , $y) = each($matches)) {
326326 if ($y > $this->seq[$k-1]) {
327327 assert($y < $this->seq[$k]);
328328 // Optimization: this is a common case:
Index: trunk/phase3/includes/Article.php
@@ -1473,7 +1473,6 @@
14741474 global $wgOut;
14751475
14761476 $oldid = $this->getOldID();
1477 - $useParserCache = $this->useParserCache( $oldid );
14781477 $parserOptions = $this->getParserOptions();
14791478
14801479 # Render printable version, use printable version cache
Index: trunk/phase3/includes/parser/LinkHolderArray.php
@@ -159,7 +159,6 @@
160160 $current = null;
161161 foreach ( $this->internals as $ns => $entries ) {
162162 foreach ( $entries as $index => $entry ) {
163 - $key = "$ns:$index";
164163 $title = $entry['title'];
165164 $pdbk = $entry['pdbk'];
166165
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php
@@ -1249,11 +1249,9 @@
12501250 $join_conds );
12511251
12521252 // We must adjust for offset
1253 - if ( isset( $options['LIMIT'] ) ) {
1254 - if ( isset ( $options['OFFSET'] ) ) {
1255 - $limit = $options['LIMIT'];
1256 - $offset = $options['OFFSET'];
1257 - }
 1253+ if ( isset( $options['LIMIT'] ) && isset ( $options['OFFSET'] ) ) {
 1254+ $limit = $options['LIMIT'];
 1255+ $offset = $options['OFFSET'];
12581256 }
12591257
12601258 // DB2 does not have a proper num_rows() function yet, so we must emulate
Index: trunk/phase3/includes/db/DatabaseMssql.php
@@ -552,9 +552,9 @@
553553 */
554554 function nextSequenceValue( $seqName ) {
555555 if ( !$this->tableExists( 'sequence_' . $seqName ) ) {
556 - $ret = sqlsrv_query( $this->mConn, "CREATE TABLE [sequence_$seqName] (id INT NOT NULL IDENTITY PRIMARY KEY, junk varchar(10) NULL)" );
 556+ sqlsrv_query( $this->mConn, "CREATE TABLE [sequence_$seqName] (id INT NOT NULL IDENTITY PRIMARY KEY, junk varchar(10) NULL)" );
557557 }
558 - $ret = sqlsrv_query( $this->mConn, "INSERT INTO [sequence_$seqName] (junk) VALUES ('')" );
 558+ sqlsrv_query( $this->mConn, "INSERT INTO [sequence_$seqName] (junk) VALUES ('')" );
559559 $ret = sqlsrv_query( $this->mConn, "SELECT TOP 1 id FROM [sequence_$seqName] ORDER BY id DESC" );
560560 $row = sqlsrv_fetch_array( $ret, SQLSRV_FETCH_ASSOC );// KEEP ASSOC THERE, weird weird bug dealing with the return value if you don't
561561
Index: trunk/phase3/includes/OutputPage.php
@@ -563,11 +563,6 @@
564564 $nameWithTags = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $name ) );
565565 $this->mPagetitle = $nameWithTags;
566566
567 - $taction = $this->getPageTitleActionText();
568 - if( !empty( $taction ) ) {
569 - $name .= ' - '.$taction;
570 - }
571 -
572567 # change "<i>foo&amp;bar</i>" to "foo&bar"
573568 $this->setHTMLTitle( wfMsg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ) );
574569 }
Index: trunk/phase3/includes/installer/MysqlUpdater.php
@@ -355,7 +355,7 @@
356356 $prev_namespace = $row->cur_namespace;
357357 }
358358 $sql = "DELETE FROM $cur WHERE cur_id IN ( " . join( ',', $deleteId ) . ')';
359 - $rows = $this->db->query( $sql, __METHOD__ );
 359+ $this->db->query( $sql, __METHOD__ );
360360 $this->output( wfTimestamp( TS_DB ) );
361361 $this->output( "......<b>Deleted</b> " . $this->db->affectedRows() . " records.\n" );
362362 }
Index: trunk/phase3/includes/installer/DatabaseInstaller.php
@@ -395,7 +395,6 @@
396396 * Set this to false to show a creation checkbox.
397397 */
398398 public function getWebUserBox( $noCreateMsg = false ) {
399 - $name = $this->getName();
400399 $s = Html::openElement( 'fieldset' ) .
401400 Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
402401 $this->getCheckBox(
Index: trunk/phase3/includes/installer/MysqlInstaller.php
@@ -366,7 +366,7 @@
367367 if ( !$create ) {
368368 // Test the web account
369369 try {
370 - $webConn = new Database(
 370+ new Database(
371371 $this->getVar( 'wgDBserver' ),
372372 $this->getVar( 'wgDBuser' ),
373373 $this->getVar( 'wgDBpassword' ),
Index: trunk/phase3/includes/installer/OracleInstaller.php
@@ -39,7 +39,6 @@
4040 }
4141
4242 public function getWebUserBox( $noCreateMsg = false ) {
43 - $name = $this->getName();
4443 $this->parent->setVar( '_SameAccount', false );
4544 $this->parent->setVar( '_CreateDBAccount', true );
4645 $this->parent->setVar( 'wgDBname', '' );
Index: trunk/phase3/includes/media/SVG.php
@@ -150,7 +150,6 @@
151151 }
152152
153153 function getMetadata( $file, $filename ) {
154 - $metadata = array();
155154 try {
156155 $metadata = SVGMetadataExtractor::getMetadata( $filename );
157156 } catch( Exception $e ) {
Index: trunk/phase3/includes/ChangesList.php
@@ -1055,7 +1055,7 @@
10561056 # Extract fields from DB into the function scope (rc_xxxx variables)
10571057 // FIXME: Would be good to replace this extract() call with something
10581058 // that explicitly initializes variables.
1059 - $classes = array(); // TODO implement
 1059+ // TODO implement
10601060 extract( $rcObj->mAttribs );
10611061 $query['curid'] = $rc_cur_id;
10621062
Index: trunk/phase3/includes/ConfEditor.php
@@ -536,7 +536,7 @@
537537
538538 switch ( $state ) {
539539 case 'file':
540 - $token = $this->expect( T_OPEN_TAG );
 540+ $this->expect( T_OPEN_TAG );
541541 $token = $this->skipSpace();
542542 if ( $token->isEnd() ) {
543543 break 2;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77297revert r76464...hashar20:01, 25 November 2010

Status & tagging log