From 97969f7d9977fc2afa32a65514accf33d891bb0a Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Mon, 1 Aug 2011 16:01:13 +0000 Subject: [PATCH] =?utf8?q?w/s=20changes:=20=E2=80=9Csvn=20diff=20-x-w?= =?utf8?q?=E2=80=9D=20is=20clean?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- includes/LinksUpdate.php | 24 ++++++++++---------- includes/Preferences.php | 2 +- includes/db/DatabaseMysql.php | 8 +++---- tests/phpunit/includes/ArticleTablesTest.php | 10 ++++---- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index 7b85040c01..ec7960f449 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -135,7 +135,7 @@ class LinksUpdate { # External links $existing = $this->getExistingExternals(); $this->incrTableUpdate( 'externallinks', 'el', $this->getExternalDeletions( $existing ), - $this->getExternalInsertions( $existing ) ); + $this->getExternalInsertions( $existing ) ); # Language links $existing = $this->getExistingInterlangs(); @@ -497,16 +497,16 @@ class LinksUpdate { * @private */ function getInterlangInsertions( $existing = array() ) { - $diffs = array_diff_assoc( $this->mInterlangs, $existing ); - $arr = array(); - foreach( $diffs as $lang => $title ) { - $arr[] = array( - 'll_from' => $this->mId, - 'll_lang' => $lang, - 'll_title' => $title - ); - } - return $arr; + $diffs = array_diff_assoc( $this->mInterlangs, $existing ); + $arr = array(); + foreach( $diffs as $lang => $title ) { + $arr[] = array( + 'll_from' => $this->mId, + 'll_lang' => $lang, + 'll_title' => $title + ); + } + return $arr; } /** @@ -612,7 +612,7 @@ class LinksUpdate { * @private */ function getInterlangDeletions( $existing ) { - return array_diff_assoc( $existing, $this->mInterlangs ); + return array_diff_assoc( $existing, $this->mInterlangs ); } /** diff --git a/includes/Preferences.php b/includes/Preferences.php index 62b99a4e63..947cfaea95 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1250,7 +1250,7 @@ class Preferences { if ( $wgLocalTZoffset == date( 'Z' ) / 60 ) { $server_tz_msg = wfMsg( 'timezoneuseserverdefault', $wgLocaltimezone ); } else { - $tzstring = sprintf( '%+03d:%02d', floor( $wgLocalTZoffset / 60 ), abs( $wgLocalTZoffset ) % 60 ); + $tzstring = sprintf( '%+03d:%02d', floor( $wgLocalTZoffset / 60 ), abs( $wgLocalTZoffset ) % 60 ); $server_tz_msg = wfMsg( 'timezoneuseserverdefault', $tzstring ); } $opt[$server_tz_msg] = "System|$wgLocalTZoffset"; diff --git a/includes/db/DatabaseMysql.php b/includes/db/DatabaseMysql.php index b2aac5da14..060ec058a4 100644 --- a/includes/db/DatabaseMysql.php +++ b/includes/db/DatabaseMysql.php @@ -175,7 +175,7 @@ class DatabaseMysql extends DatabaseBase { return $row; } - function fetchRow( $res ) { + function fetchRow( $res ) { if ( $res instanceof ResultWrapper ) { $res = $res->result; } @@ -432,7 +432,7 @@ class DatabaseMysql extends DatabaseBase { } return false; } - + /** * Wait for the slave to catch up to a given master position. * @@ -672,7 +672,7 @@ class DatabaseMysql extends DatabaseBase { } $this->query( $query, $fname ); } - + /** * List all tables on the database * @@ -692,7 +692,7 @@ class DatabaseMysql extends DatabaseBase { $endArray[] = $table; } } - + return $endArray; } diff --git a/tests/phpunit/includes/ArticleTablesTest.php b/tests/phpunit/includes/ArticleTablesTest.php index ef8e255cae..55919c2c7d 100644 --- a/tests/phpunit/includes/ArticleTablesTest.php +++ b/tests/phpunit/includes/ArticleTablesTest.php @@ -7,14 +7,14 @@ class ArticleTablesTest extends MediaWikiLangTestCase { function testbug14404() { global $wgUser, $wgContLang, $wgLanguageCode, $wgLang; - + $title = Title::newFromText("Bug 14404"); $article = new Article( $title ); $wgUser = new User(); $wgUser->mRights['*'] = array( 'createpage', 'edit', 'purge' ); $wgLanguageCode = 'es'; $wgContLang = Language::factory( 'es' ); - + $wgLang = Language::factory( 'fr' ); $status = $article->doEdit( '{{:{{int:history}}}}', 'Test code for bug 14404', 0 ); $templates1 = $article->getUsedTemplates(); @@ -22,13 +22,13 @@ class ArticleTablesTest extends MediaWikiLangTestCase { $wgLang = Language::factory( 'de' ); $article->mParserOptions = null; // Let it pick the new user language $article->mPreparedEdit = false; // In order to force the rerendering of the same wikitext - + // We need an edit, a purge is not enough to regenerate the tables $status = $article->doEdit( '{{:{{int:history}}}}', 'Test code for bug 14404', EDIT_UPDATE ); $templates2 = $article->getUsedTemplates(); - + $this->assertEquals( $templates1, $templates2 ); $this->assertEquals( $templates1[0]->getFullText(), 'Historial' ); } - + } -- 2.20.1