From cadc951d151d7519baade36bcd0e1e678d87b94b Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 25 Nov 2010 22:24:11 +0000 Subject: [PATCH] More reversion of r77297, 1 of 2 commits to keep it readable in CR (hopefully) --- includes/Article.php | 1 - includes/ChangesList.php | 2 +- includes/ConfEditor.php | 2 +- includes/OutputPage.php | 5 ----- includes/db/DatabaseIbm_db2.php | 8 +++----- includes/db/DatabaseMssql.php | 4 ++-- includes/diff/WikiDiff.php | 4 ++-- includes/installer/DatabaseInstaller.php | 1 - includes/installer/MysqlInstaller.php | 2 +- includes/installer/MysqlUpdater.php | 2 +- includes/installer/OracleInstaller.php | 1 - includes/media/SVG.php | 1 - includes/parser/LinkHolderArray.php | 1 - 13 files changed, 11 insertions(+), 23 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index f82b141ce9..7a99bef3a9 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1473,7 +1473,6 @@ class Article { global $wgOut; $oldid = $this->getOldID(); - $useParserCache = $this->useParserCache( $oldid ); $parserOptions = $this->getParserOptions(); # Render printable version, use printable version cache diff --git a/includes/ChangesList.php b/includes/ChangesList.php index a75ff2fcac..5de3b06d41 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -1055,7 +1055,7 @@ class EnhancedChangesList extends ChangesList { # Extract fields from DB into the function scope (rc_xxxx variables) // FIXME: Would be good to replace this extract() call with something // that explicitly initializes variables. - $classes = array(); // TODO implement + // TODO implement extract( $rcObj->mAttribs ); $query['curid'] = $rc_cur_id; diff --git a/includes/ConfEditor.php b/includes/ConfEditor.php index d62a9ceb1b..f240628e15 100644 --- a/includes/ConfEditor.php +++ b/includes/ConfEditor.php @@ -536,7 +536,7 @@ class ConfEditor { switch ( $state ) { case 'file': - $token = $this->expect( T_OPEN_TAG ); + $this->expect( T_OPEN_TAG ); $token = $this->skipSpace(); if ( $token->isEnd() ) { break 2; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 3740952114..a80d4eb89c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -563,11 +563,6 @@ class OutputPage { $nameWithTags = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $name ) ); $this->mPagetitle = $nameWithTags; - $taction = $this->getPageTitleActionText(); - if( !empty( $taction ) ) { - $name .= ' - '.$taction; - } - # change "foo&bar" to "foo&bar" $this->setHTMLTitle( wfMsg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ) ); } diff --git a/includes/db/DatabaseIbm_db2.php b/includes/db/DatabaseIbm_db2.php index 5d795862e0..a3a6829b77 100644 --- a/includes/db/DatabaseIbm_db2.php +++ b/includes/db/DatabaseIbm_db2.php @@ -1249,11 +1249,9 @@ EOF; $join_conds ); // We must adjust for offset - if ( isset( $options['LIMIT'] ) ) { - if ( isset ( $options['OFFSET'] ) ) { - $limit = $options['LIMIT']; - $offset = $options['OFFSET']; - } + if ( isset( $options['LIMIT'] ) && isset ( $options['OFFSET'] ) ) { + $limit = $options['LIMIT']; + $offset = $options['OFFSET']; } // DB2 does not have a proper num_rows() function yet, so we must emulate diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index a1b0a30e04..93c1cf2c6f 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -552,9 +552,9 @@ class DatabaseMssql extends DatabaseBase { */ function nextSequenceValue( $seqName ) { if ( !$this->tableExists( 'sequence_' . $seqName ) ) { - $ret = sqlsrv_query( $this->mConn, "CREATE TABLE [sequence_$seqName] (id INT NOT NULL IDENTITY PRIMARY KEY, junk varchar(10) NULL)" ); + sqlsrv_query( $this->mConn, "CREATE TABLE [sequence_$seqName] (id INT NOT NULL IDENTITY PRIMARY KEY, junk varchar(10) NULL)" ); } - $ret = sqlsrv_query( $this->mConn, "INSERT INTO [sequence_$seqName] (junk) VALUES ('')" ); + sqlsrv_query( $this->mConn, "INSERT INTO [sequence_$seqName] (junk) VALUES ('')" ); $ret = sqlsrv_query( $this->mConn, "SELECT TOP 1 id FROM [sequence_$seqName] ORDER BY id DESC" ); $row = sqlsrv_fetch_array( $ret, SQLSRV_FETCH_ASSOC );// KEEP ASSOC THERE, weird weird bug dealing with the return value if you don't diff --git a/includes/diff/WikiDiff.php b/includes/diff/WikiDiff.php index c148d23853..47605506d0 100644 --- a/includes/diff/WikiDiff.php +++ b/includes/diff/WikiDiff.php @@ -313,7 +313,7 @@ class _DiffEngine { } $matches = $ymatches[$line]; reset($matches); - while ( list( $junk, $y ) = each( $matches ) ) { + while ( list( , $y ) = each( $matches ) ) { if ( empty( $this->in_seq[$y] ) ) { $k = $this->_lcs_pos( $y ); assert( $k > 0 ); @@ -321,7 +321,7 @@ class _DiffEngine { break; } } - while (list ( /* $junk */, $y) = each($matches)) { + while (list ( , $y) = each($matches)) { if ($y > $this->seq[$k-1]) { assert($y < $this->seq[$k]); // Optimization: this is a common case: diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 1bf498f34d..26cf53c316 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -395,7 +395,6 @@ abstract class DatabaseInstaller { * Set this to false to show a creation checkbox. */ public function getWebUserBox( $noCreateMsg = false ) { - $name = $this->getName(); $s = Html::openElement( 'fieldset' ) . Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) . $this->getCheckBox( diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index 12d02c544c..033875a298 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -366,7 +366,7 @@ class MysqlInstaller extends DatabaseInstaller { if ( !$create ) { // Test the web account try { - $webConn = new Database( + new Database( $this->getVar( 'wgDBserver' ), $this->getVar( 'wgDBuser' ), $this->getVar( 'wgDBpassword' ), diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 911a7d2a01..50376a5ca4 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -355,7 +355,7 @@ class MysqlUpdater extends DatabaseUpdater { $prev_namespace = $row->cur_namespace; } $sql = "DELETE FROM $cur WHERE cur_id IN ( " . join( ',', $deleteId ) . ')'; - $rows = $this->db->query( $sql, __METHOD__ ); + $this->db->query( $sql, __METHOD__ ); $this->output( wfTimestamp( TS_DB ) ); $this->output( "......Deleted " . $this->db->affectedRows() . " records.\n" ); } diff --git a/includes/installer/OracleInstaller.php b/includes/installer/OracleInstaller.php index 8dbc7ad3e5..19c64e17d9 100644 --- a/includes/installer/OracleInstaller.php +++ b/includes/installer/OracleInstaller.php @@ -39,7 +39,6 @@ class OracleInstaller extends DatabaseInstaller { } public function getWebUserBox( $noCreateMsg = false ) { - $name = $this->getName(); $this->parent->setVar( '_SameAccount', false ); $this->parent->setVar( '_CreateDBAccount', true ); $this->parent->setVar( 'wgDBname', '' ); diff --git a/includes/media/SVG.php b/includes/media/SVG.php index 6c2d98059a..899429cc9e 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -150,7 +150,6 @@ class SvgHandler extends ImageHandler { } function getMetadata( $file, $filename ) { - $metadata = array(); try { $metadata = SVGMetadataExtractor::getMetadata( $filename ); } catch( Exception $e ) { diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index f879a65f09..d9ec72be83 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -159,7 +159,6 @@ class LinkHolderArray { $current = null; foreach ( $this->internals as $ns => $entries ) { foreach ( $entries as $index => $entry ) { - $key = "$ns:$index"; $title = $entry['title']; $pdbk = $entry['pdbk']; -- 2.20.1