From c15c1c6abb417c9190a8db3a7f914117673d8f97 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 25 Nov 2010 22:24:28 +0000 Subject: [PATCH] More reversion of r77297, 2 of 2 commits to keep it readable in CR (hopefully) --- includes/SkinTemplate.php | 1 - includes/Title.php | 1 - includes/parser/Parser.php | 1 - includes/parser/Preprocessor_DOM.php | 12 +++++------- includes/specials/SpecialComparePages.php | 1 - includes/specials/SpecialSearch.php | 6 ++---- includes/specials/SpecialUserlogin.php | 3 +-- includes/upload/UploadBase.php | 2 +- maintenance/dumpTextPass.php | 1 - maintenance/orphans.php | 1 - maintenance/populateCategory.php | 1 - maintenance/reassignEdits.php | 2 +- .../tests/phpunit/includes/UploadFromUrlTest.php | 1 - .../tests/phpunit/includes/api/ApiUploadTest.php | 3 +-- 14 files changed, 11 insertions(+), 25 deletions(-) diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index bd794c73c9..1a713fdc88 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -358,7 +358,6 @@ class SkinTemplate extends Skin { if( $wgPageShowWatchingUsers ) { $dbr = wfGetDB( DB_SLAVE ); - $watchlist = $dbr->tableName( 'watchlist' ); $res = $dbr->select( 'watchlist', array( 'COUNT(*) AS n' ), array( 'wl_title' => $dbr->strencode( $this->mTitle->getDBkey() ), 'wl_namespace' => $this->mTitle->getNamespace() ), diff --git a/includes/Title.php b/includes/Title.php index 5b90cfeb93..13ea7d909c 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3302,7 +3302,6 @@ class Title { # Truncate for whole multibyte characters. +5 bytes for ellipsis $comment = $wgContLang->truncate( $comment, 250 ); - $newid = $nt->getArticleID(); $oldid = $this->getArticleID(); $latest = $this->getLatestRevId(); diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 336bdea6ab..ae5e89199c 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -789,7 +789,6 @@ class Parser { wfProfileIn( __METHOD__ ); $lines = StringUtils::explode( "\n", $text ); - $text = null; $out = ''; $td_history = array(); # Is currently a td tag open? $last_tag_history = array(); # Save history of last lag activated (td, th or caption) diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index 991f28cc42..2b635f7c0d 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -511,9 +511,7 @@ class Preprocessor_DOM implements Preprocessor { // another heading. Infinite loops are avoided because the next iteration MUST // hit the heading open case above, which unconditionally increments the // input pointer. - } - - elseif ( $found == 'open' ) { + } elseif ( $found == 'open' ) { # count opening brace characters $count = strspn( $text, $curChar, $i ); @@ -536,9 +534,7 @@ class Preprocessor_DOM implements Preprocessor { $accum .= htmlspecialchars( str_repeat( $curChar, $count ) ); } $i += $count; - } - - elseif ( $found == 'close' ) { + } elseif ( $found == 'close' ) { $piece = $stack->top; # lets check if there are enough characters for closing brace $maxCount = $piece->count; @@ -961,7 +957,9 @@ class PPFrame_DOM implements PPFrame { $iteratorStack[$level] = false; } - if ( $contextNode instanceof PPNode_DOM ) $contextNode = $contextNode->node; + if ( $contextNode instanceof PPNode_DOM ) { + $contextNode = $contextNode->node; + } $newIterator = false; diff --git a/includes/specials/SpecialComparePages.php b/includes/specials/SpecialComparePages.php index 8f7d024307..4650fc9458 100644 --- a/includes/specials/SpecialComparePages.php +++ b/includes/specials/SpecialComparePages.php @@ -97,7 +97,6 @@ class SpecialComparePages extends SpecialPage { $this->form(); if( $this->opts->getValue( 'rev1' ) && $this->opts->getValue( 'rev2' ) ) { - $title = Title::newFromText( $this->opts->getValue( 'page2' ) ); $de = new DifferenceEngine( null, $this->opts->getValue( 'rev1' ), $this->opts->getValue( 'rev2' ), diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index b922c6fd9d..2a0c9efd47 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -342,9 +342,9 @@ class SpecialSearch { global $wgOut; // Figure out the active search profile header $nsAllSet = array_keys( SearchEngine::searchableNamespaces() ); - if( $this->searchAdvanced ) + if( $this->searchAdvanced ) { $this->active = 'advanced'; - else { + } else { $profiles = $this->getSearchProfiles(); foreach( $profiles as $key => $data ) { @@ -416,7 +416,6 @@ class SpecialSearch { if( !is_null($infoLine) ) { $out .= "\n\n"; } - $off = $this->offset + 1; $out .= "