More reversion of r77297, 2 of 2 commits to keep it readable in CR (hopefully)

This commit is contained in:
Sam Reed 2010-11-25 22:24:28 +00:00
parent cadc951d15
commit c15c1c6abb
14 changed files with 11 additions and 25 deletions

View file

@ -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() ),

View file

@ -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();

View file

@ -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)

View file

@ -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;

View file

@ -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' ),

View file

@ -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<!-- {$infoLine} -->\n";
}
$off = $this->offset + 1;
$out .= "<ul class='mw-search-results'>\n";
while( $result = $matches->next() ) {
$out .= $this->showHit( $result, $terms );
@ -623,7 +622,6 @@ class SpecialSearch {
$out = "<div id='mw-search-interwiki'><div id='mw-search-interwiki-caption'>".
wfMsg('search-interwiki-caption')."</div>\n";
$off = $this->offset + 1;
$out .= "<ul class='mw-search-iwresults'>\n";
// work out custom project captions

View file

@ -176,7 +176,6 @@ class LoginForm {
$wgOut->addWikiMsg( 'accmailtext', $u->getName(), $u->getEmail() );
$wgOut->returnToMain( false );
}
$u = 0;
}
/**
@ -620,7 +619,7 @@ class LoginForm {
}
wfDebug( __METHOD__ . ": creating account\n" );
$user = $this->initUser( $user, true );
$this->initUser( $user, true );
return self::SUCCESS;
}

View file

@ -340,7 +340,7 @@ abstract class UploadBase {
protected function verifyFile() {
# get the title, even though we are doing nothing with it, because
# we need to populate mFinalExtension
$nt = $this->getTitle();
$this->getTitle();
$this->mFileProps = File::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
$this->checkMacBinary();

View file

@ -263,7 +263,6 @@ class TextPassDumper extends BackupDumper {
while ( true ) {
try {
$text = $this->getTextDb( $id );
$ex = new MWException( "Graceful storage failure" );
} catch ( DBQueryError $ex ) {
$text = false;
}

View file

@ -165,7 +165,6 @@ class Orphans extends Maintenance {
$dbw = wfGetDB( DB_MASTER );
$page = $dbw->tableName( 'page' );
$revision = $dbw->tableName( 'revision' );
$text = $dbw->tableName( 'text' );
if ( $fix ) {
$dbw->lockTables( $dbw, 'text', __METHOD__ );

View file

@ -66,7 +66,6 @@ TEXT;
$maxlag = intval( $maxlag );
$throttle = intval( $throttle );
$force = (bool)$force;
if ( $begin !== '' ) {
$where = 'cl_to > ' . $dbw->addQuotes( $begin );
} else {

View file

@ -108,7 +108,7 @@ class ReassignEdits extends Maintenance {
# Update recent changes if required
if ( $rc ) {
$this->output( "Updating recent changes..." );
$res = $dbw->update( 'recentchanges', $this->userSpecification( $to, 'rc_user', 'rc_user_text' ), $this->userConditions( $from, 'rc_user', 'rc_user_text' ), __METHOD__ );
$dbw->update( 'recentchanges', $this->userSpecification( $to, 'rc_user', 'rc_user_text' ), $this->userConditions( $from, 'rc_user', 'rc_user_text' ), __METHOD__ );
$this->output( "done.\n" );
}
}

View file

@ -133,7 +133,6 @@ class UploadFromUrlTest extends ApiTestSetup {
$this->assertTrue( $exception, "Got exception" );
self::$user->addGroup( 'sysop' );
$exception = false;
$data = $this->doApiRequest( array(
'action' => 'upload',
'url' => 'http://bits.wikimedia.org/skins-1.5/common/images/poweredby_mediawiki_88x31.png',

View file

@ -303,7 +303,6 @@ class ApiUploadTest extends ApiTestCase {
global $wgUser;
$wgUser = self::$users['uploader']->user;
$extension = 'png';
$mimeType = 'image/png';
$filePath = tempnam( wfTempDir(), "" );
@ -617,7 +616,7 @@ class ApiUploadTest extends ApiTestCase {
$hash = File::sha1Base36( $filePath );
$dupes = RepoGroup::singleton()->findBySha1( $hash );
$success = true;
foreach ( $dupes as $key => $dupe ) {
foreach ( $dupes as $dupe ) {
$success &= $this->deleteFileByTitle( $dupe->getTitle() );
}
return $success;