More reversion of r77297, 1 of 2 commits to keep it readable in CR (hopefully)
authorSam Reed <reedy@users.mediawiki.org>
Thu, 25 Nov 2010 22:24:11 +0000 (22:24 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 25 Nov 2010 22:24:11 +0000 (22:24 +0000)
13 files changed:
includes/Article.php
includes/ChangesList.php
includes/ConfEditor.php
includes/OutputPage.php
includes/db/DatabaseIbm_db2.php
includes/db/DatabaseMssql.php
includes/diff/WikiDiff.php
includes/installer/DatabaseInstaller.php
includes/installer/MysqlInstaller.php
includes/installer/MysqlUpdater.php
includes/installer/OracleInstaller.php
includes/media/SVG.php
includes/parser/LinkHolderArray.php

index f82b141..7a99bef 100644 (file)
@@ -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
index a75ff2f..5de3b06 100644 (file)
@@ -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;
 
index d62a9ce..f240628 100644 (file)
@@ -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;
index 3740952..a80d4eb 100644 (file)
@@ -563,11 +563,6 @@ class OutputPage {
                $nameWithTags = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $name ) );
                $this->mPagetitle = $nameWithTags;
 
-               $taction = $this->getPageTitleActionText();
-               if( !empty( $taction ) ) {
-                       $name .= ' - '.$taction;
-               }
-
                # change "<i>foo&amp;bar</i>" to "foo&bar"
                $this->setHTMLTitle( wfMsg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ) );
        }
index 5d79586..a3a6829 100644 (file)
@@ -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
index a1b0a30..93c1cf2 100644 (file)
@@ -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
 
index c148d23..4760550 100644 (file)
@@ -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:
index 1bf498f..26cf53c 100644 (file)
@@ -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(
index 12d02c5..033875a 100644 (file)
@@ -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' ),
index 911a7d2..50376a5 100644 (file)
@@ -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( "......<b>Deleted</b> " . $this->db->affectedRows() . " records.\n" );
                }
index 8dbc7ad..19c64e1 100644 (file)
@@ -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', '' );
index 6c2d980..899429c 100644 (file)
@@ -150,7 +150,6 @@ class SvgHandler extends ImageHandler {
        }
 
        function getMetadata( $file, $filename ) {
-               $metadata = array();
                try {
                        $metadata = SVGMetadataExtractor::getMetadata( $filename );
                } catch( Exception $e ) {
index f879a65..d9ec72b 100644 (file)
@@ -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'];