From 48cd72819ee379aa6eb4728ba431b802aa3255e1 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 3 Feb 2013 20:28:43 +0100 Subject: [PATCH] fix some spacing Change-Id: Ia9650be8b791fd2f0ccbc099436918a9d12d9968 --- includes/installer/CliInstaller.php | 2 +- includes/installer/DatabaseInstaller.php | 4 +- includes/installer/DatabaseUpdater.php | 4 +- includes/installer/Installer.php | 30 ++++++------ includes/installer/MysqlInstaller.php | 3 +- includes/installer/MysqlUpdater.php | 2 +- includes/installer/OracleInstaller.php | 4 +- includes/installer/OracleUpdater.php | 4 +- includes/installer/PostgresUpdater.php | 48 +++++++++---------- includes/installer/WebInstaller.php | 4 +- includes/installer/WebInstallerOutput.php | 4 +- includes/installer/WebInstallerPage.php | 16 +++---- includes/objectcache/EhcacheBagOStuff.php | 28 +++++------ includes/objectcache/MemcachedClient.php | 2 +- includes/objectcache/SqlBagOStuff.php | 6 +-- includes/specials/SpecialAllpages.php | 8 ++-- includes/specials/SpecialBlankpage.php | 2 +- includes/specials/SpecialBlock.php | 6 +-- includes/specials/SpecialBlockList.php | 2 +- includes/specials/SpecialBooksources.php | 12 ++--- includes/specials/SpecialCategories.php | 4 +- includes/specials/SpecialContributions.php | 4 +- includes/specials/SpecialDisambiguations.php | 10 ++-- includes/specials/SpecialExport.php | 6 +-- includes/specials/SpecialImport.php | 2 +- includes/specials/SpecialLinkSearch.php | 16 +++---- includes/specials/SpecialListfiles.php | 2 +- includes/specials/SpecialListusers.php | 4 +- includes/specials/SpecialMovepage.php | 32 ++++++------- includes/specials/SpecialNewpages.php | 10 ++-- includes/specials/SpecialProtectedpages.php | 18 +++---- includes/specials/SpecialProtectedtitles.php | 10 ++-- includes/specials/SpecialRecentchanges.php | 6 +-- includes/specials/SpecialRevisiondelete.php | 2 +- includes/specials/SpecialSearch.php | 2 +- includes/specials/SpecialSpecialpages.php | 2 +- includes/specials/SpecialStatistics.php | 4 +- .../SpecialUncategorizedcategories.php | 2 +- includes/specials/SpecialUndelete.php | 14 +++--- includes/specials/SpecialUpload.php | 47 +++++++++--------- includes/specials/SpecialUserlogin.php | 2 +- includes/specials/SpecialUserrights.php | 4 +- includes/specials/SpecialVersion.php | 2 +- includes/specials/SpecialWatchlist.php | 28 +++++------ 44 files changed, 212 insertions(+), 212 deletions(-) diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 38b4a82481..75e55f14ba 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -193,7 +193,7 @@ class CliInstaller extends Installer { public function envCheckPath( ) { if ( !$this->specifiedScriptPath ) { - $this->showMessage( 'config-no-cli-uri', $this->getVar("wgScriptPath") ); + $this->showMessage( 'config-no-cli-uri', $this->getVar( "wgScriptPath" ) ); } return parent::envCheckPath(); } diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index f27165d091..10d23fb130 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -240,7 +240,7 @@ abstract class DatabaseInstaller { if ( $status->isOK() ) { $status->value->setSchemaVars( $this->getSchemaVars() ); } else { - throw new MWException( __METHOD__.': unexpected DB connection error' ); + throw new MWException( __METHOD__ . ': unexpected DB connection error' ); } } @@ -252,7 +252,7 @@ abstract class DatabaseInstaller { public function enableLB() { $status = $this->getConnection(); if ( !$status->isOK() ) { - throw new MWException( __METHOD__.': unexpected DB connection error' ); + throw new MWException( __METHOD__ . ': unexpected DB connection error' ); } LBFactory::setInstance( new LBFactory_Single( array( 'connection' => $status->value ) ) ); diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 9caf1688e1..746cd12ac2 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -451,7 +451,7 @@ abstract class DatabaseUpdater { $key = "updatelist-$version-" . time(); $this->db->insert( 'updatelog', array( 'ul_key' => $key, 'ul_value' => serialize( $updates ) ), - __METHOD__ ); + __METHOD__ ); $this->db->setFlag( DBO_DDLMODE ); } @@ -633,7 +633,7 @@ abstract class DatabaseUpdater { } else { $this->db->sourceFile( $path ); } - $this->output( "done.\n" ); + $this->output( "done.\n" ); return true; } diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index da351ca6db..325f894c5c 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -488,7 +488,7 @@ abstract class Installer { if( !$_lsExists ) { return false; } - unset($_lsExists); + unset( $_lsExists ); require( "$IP/includes/DefaultSettings.php" ); require( "$IP/LocalSettings.php" ); @@ -1073,18 +1073,18 @@ abstract class Installer { * @return string */ protected function unicodeChar( $c ) { - $c = hexdec($c); - if ($c <= 0x7F) { - return chr($c); - } elseif ($c <= 0x7FF) { - return chr(0xC0 | $c >> 6) . chr(0x80 | $c & 0x3F); - } elseif ($c <= 0xFFFF) { - return chr(0xE0 | $c >> 12) . chr(0x80 | $c >> 6 & 0x3F) - . chr(0x80 | $c & 0x3F); - } elseif ($c <= 0x10FFFF) { - return chr(0xF0 | $c >> 18) . chr(0x80 | $c >> 12 & 0x3F) - . chr(0x80 | $c >> 6 & 0x3F) - . chr(0x80 | $c & 0x3F); + $c = hexdec( $c ); + if ( $c <= 0x7F ) { + return chr( $c ); + } elseif ( $c <= 0x7FF ) { + return chr( 0xC0 | $c >> 6 ) . chr( 0x80 | $c & 0x3F ); + } elseif ( $c <= 0xFFFF ) { + return chr( 0xE0 | $c >> 12 ) . chr( 0x80 | $c >> 6 & 0x3F ) + . chr( 0x80 | $c & 0x3F ); + } elseif ( $c <= 0x10FFFF ) { + return chr( 0xF0 | $c >> 18 ) . chr( 0x80 | $c >> 12 & 0x3F ) + . chr( 0x80 | $c >> 6 & 0x3F ) + . chr( 0x80 | $c & 0x3F ); } else { return false; } @@ -1105,8 +1105,8 @@ abstract class Installer { * Note that we use the hex representation to create the code * points in order to avoid any Unicode-destroying during transit. */ - $not_normal_c = $this->unicodeChar("FA6C"); - $normal_c = $this->unicodeChar("242EE"); + $not_normal_c = $this->unicodeChar( "FA6C" ); + $normal_c = $this->unicodeChar( "242EE" ); $useNormalizer = 'php'; $needsUpdate = false; diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index 94c38c4c66..4eb2d396aa 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -516,7 +516,8 @@ class MysqlInstaller extends DatabaseInstaller { } if( $tryToCreate ) { - $createHostList = array($server, + $createHostList = array( + $server, 'localhost', 'localhost.localdomain', '%' diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index da638deedc..a19637e4dd 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -329,7 +329,7 @@ class MysqlUpdater extends DatabaseUpdater { } if( $this->applyPatch( 'patch-fix-il_from.sql', false, "Fixing ancient broken imagelinks table." ) ) { - $this->output("NOTE: you will have to run maintenance/refreshLinks.php after this." ); + $this->output( "NOTE: you will have to run maintenance/refreshLinks.php after this." ); } } diff --git a/includes/installer/OracleInstaller.php b/includes/installer/OracleInstaller.php index 845816e566..4c72a8ff08 100644 --- a/includes/installer/OracleInstaller.php +++ b/includes/installer/OracleInstaller.php @@ -119,7 +119,7 @@ class OracleInstaller extends DatabaseInstaller { return $status; } if ( !$this->getVar( '_CreateDBAccount' ) ) { - $status->fatal('config-db-sys-create-oracle'); + $status->fatal( 'config-db-sys-create-oracle' ); } } else { return $status; @@ -241,7 +241,7 @@ class OracleInstaller extends DatabaseInstaller { $status->fatal( 'config-db-sys-user-exists-oracle', $this->getVar( 'wgDBuser' ) ); } - if ($status->isOK()) { + if ( $status->isOK() ) { // user created or already existing, switching back to a normal connection // as the new user has all needed privileges to setup the rest of the schema // i will be using that user as _InstallUser from this point on diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index 8f43a6d506..cafe8cd78e 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -163,7 +163,7 @@ class OracleUpdater extends DatabaseUpdater { * converted to NULL in Oracle */ protected function doRemoveNotNullEmptyDefaults() { - $meta = $this->db->fieldInfo( 'categorylinks' , 'cl_sortkey_prefix' ); + $meta = $this->db->fieldInfo( 'categorylinks', 'cl_sortkey_prefix' ); if ( $meta->isNullable() ) { return; } @@ -171,7 +171,7 @@ class OracleUpdater extends DatabaseUpdater { } protected function doRemoveNotNullEmptyDefaults2() { - $meta = $this->db->fieldInfo( 'ipblocks' , 'ipb_by_text' ); + $meta = $this->db->fieldInfo( 'ipblocks', 'ipb_by_text' ); if ( $meta->isNullable() ) { return; } diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index 3b1f7d0aef..643459f116 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -239,62 +239,62 @@ class PostgresUpdater extends DatabaseUpdater { array( 'addPgIndex', 'filearchive', 'fa_sha1', '(fa_sha1)' ), array( 'checkIndex', 'pagelink_unique', array( - array('pl_from', 'int4_ops', 'btree', 0), - array('pl_namespace', 'int2_ops', 'btree', 0), - array('pl_title', 'text_ops', 'btree', 0), + array( 'pl_from', 'int4_ops', 'btree', 0 ), + array( 'pl_namespace', 'int2_ops', 'btree', 0 ), + array( 'pl_title', 'text_ops', 'btree', 0 ), ), 'CREATE UNIQUE INDEX pagelink_unique ON pagelinks (pl_from,pl_namespace,pl_title)' ), array( 'checkIndex', 'cl_sortkey', array( - array('cl_to', 'text_ops', 'btree', 0), - array('cl_sortkey', 'text_ops', 'btree', 0), - array('cl_from', 'int4_ops', 'btree', 0), + array( 'cl_to', 'text_ops', 'btree', 0 ), + array( 'cl_sortkey', 'text_ops', 'btree', 0 ), + array( 'cl_from', 'int4_ops', 'btree', 0 ), ), 'CREATE INDEX cl_sortkey ON "categorylinks" USING "btree" ("cl_to", "cl_sortkey", "cl_from")' ), array( 'checkIndex', 'logging_times', array( - array('log_timestamp', 'timestamptz_ops', 'btree', 0), + array( 'log_timestamp', 'timestamptz_ops', 'btree', 0 ), ), 'CREATE INDEX "logging_times" ON "logging" USING "btree" ("log_timestamp")' ), array( 'dropIndex', 'oldimage', 'oi_name' ), array( 'checkIndex', 'oi_name_archive_name', array( - array('oi_name', 'text_ops', 'btree', 0), - array('oi_archive_name', 'text_ops', 'btree', 0), + array( 'oi_name', 'text_ops', 'btree', 0 ), + array( 'oi_archive_name', 'text_ops', 'btree', 0 ), ), 'CREATE INDEX "oi_name_archive_name" ON "oldimage" USING "btree" ("oi_name", "oi_archive_name")' ), array( 'checkIndex', 'oi_name_timestamp', array( - array('oi_name', 'text_ops', 'btree', 0), - array('oi_timestamp', 'timestamptz_ops', 'btree', 0), + array( 'oi_name', 'text_ops', 'btree', 0 ), + array( 'oi_timestamp', 'timestamptz_ops', 'btree', 0 ), ), 'CREATE INDEX "oi_name_timestamp" ON "oldimage" USING "btree" ("oi_name", "oi_timestamp")' ), array( 'checkIndex', 'page_main_title', array( - array('page_title', 'text_pattern_ops', 'btree', 0), + array( 'page_title', 'text_pattern_ops', 'btree', 0 ), ), 'CREATE INDEX "page_main_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 0)' ), array( 'checkIndex', 'page_mediawiki_title', array( - array('page_title', 'text_pattern_ops', 'btree', 0), + array( 'page_title', 'text_pattern_ops', 'btree', 0 ), ), 'CREATE INDEX "page_mediawiki_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 8)' ), array( 'checkIndex', 'page_project_title', array( - array('page_title', 'text_pattern_ops', 'btree', 0), + array( 'page_title', 'text_pattern_ops', 'btree', 0 ), ), 'CREATE INDEX "page_project_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 4)' ), array( 'checkIndex', 'page_talk_title', array( - array('page_title', 'text_pattern_ops', 'btree', 0), + array( 'page_title', 'text_pattern_ops', 'btree', 0 ), ), 'CREATE INDEX "page_talk_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 1)' ), array( 'checkIndex', 'page_user_title', array( - array('page_title', 'text_pattern_ops', 'btree', 0), + array( 'page_title', 'text_pattern_ops', 'btree', 0 ), ), 'CREATE INDEX "page_user_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 2)' ), array( 'checkIndex', 'page_utalk_title', array( - array('page_title', 'text_pattern_ops', 'btree', 0), + array( 'page_title', 'text_pattern_ops', 'btree', 0 ), ), 'CREATE INDEX "page_utalk_title" ON "page" USING "btree" ("page_title" "text_pattern_ops") WHERE ("page_namespace" = 3)' ), array( 'checkIndex', 'ts2_page_text', array( - array('textvector', 'tsvector_ops', 'gist', 0), + array( 'textvector', 'tsvector_ops', 'gist', 0 ), ), 'CREATE INDEX "ts2_page_text" ON "pagecontent" USING "gist" ("textvector")' ), array( 'checkIndex', 'ts2_page_title', array( - array('titlevector', 'tsvector_ops', 'gist', 0), + array( 'titlevector', 'tsvector_ops', 'gist', 0 ), ), 'CREATE INDEX "ts2_page_title" ON "page" USING "gist" ("titlevector")' ), @@ -303,10 +303,10 @@ class PostgresUpdater extends DatabaseUpdater { array( 'checkRevUserFkey' ), array( 'dropIndex', 'ipblocks', 'ipb_address'), array( 'checkIndex', 'ipb_address_unique', array( - array('ipb_address', 'text_ops', 'btree', 0), - array('ipb_user', 'int4_ops', 'btree', 0), - array('ipb_auto', 'int2_ops', 'btree', 0), - array('ipb_anon_only', 'int2_ops', 'btree', 0), + array( 'ipb_address', 'text_ops', 'btree', 0 ), + array( 'ipb_user', 'int4_ops', 'btree', 0 ), + array( 'ipb_auto', 'int2_ops', 'btree', 0 ), + array( 'ipb_anon_only', 'int2_ops', 'btree', 0 ), ), 'CREATE UNIQUE INDEX ipb_address_unique ON ipblocks (ipb_address,ipb_user,ipb_auto,ipb_anon_only)' ), @@ -509,7 +509,7 @@ END; $this->output( "Creating sequence $ns\n" ); $this->db->query( "CREATE SEQUENCE $ns" ); if( $pkey !== false ) { - $this->setDefault( $table, $pkey, '"nextval"(\'"' . $ns . '"\'::"regclass")' ); + $this->setDefault( $table, $pkey, '"nextval"(\'"' . $ns . '"\'::"regclass")' ); } } } diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 8cee4b22f4..c08087102a 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -933,7 +933,7 @@ class WebInstaller extends Installer { * @return string */ public function getRadioSet( $params ) { - if ( !isset( $params['controlName'] ) ) { + if ( !isset( $params['controlName'] ) ) { $params['controlName'] = 'config_' . $params['var']; } @@ -1096,7 +1096,7 @@ class WebInstaller extends Installer { } elseif ( !empty( $_SERVER['SCRIPT_NAME'] ) ) { $path = $_SERVER['SCRIPT_NAME']; } - if ($path !== false) { + if ( $path !== false ) { $uri = preg_replace( '{^(.*)/(mw-)?config.*$}', '$1', $path ); $this->setVar( 'wgScriptPath', $uri ); } else { diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index f3166c256f..42f451f66f 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -219,7 +219,7 @@ class WebInstallerOutput { $dbTypes = $this->parent->getDBTypes(); $this->parent->request->response()->header( 'Content-Type: text/html; charset=utf-8' ); - if (!$this->allowFrames) { + if ( !$this->allowFrames ) { $this->parent->request->response()->header( 'X-Frame-Options: DENY' ); } if ( $this->redirectTarget ) { @@ -239,7 +239,7 @@ class WebInstallerOutput { <?php $this->outputTitle(); ?> getCssUrl() . "\n"; ?> - + getJQuery() . "\n"; ?> diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 572360a045..07047f21ba 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -369,7 +369,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage { // Set the relevant variables from LocalSettings.php $requiredVars = array( 'wgDBtype' ); - $status = $this->importVariables( $requiredVars , $vars ); + $status = $this->importVariables( $requiredVars, $vars ); $installer = $this->parent->getDBInstaller(); $status->merge( $this->importVariables( $installer->getGlobalNames(), $vars ) ); if ( !$status->isOK() ) { @@ -645,7 +645,7 @@ class WebInstaller_Name extends WebInstallerPage { $this->parent->getTextBox( array( 'var' => 'wgSitename', 'label' => 'config-site-name', - 'help' => $this->parent->getHelpBox( 'config-site-name-help' ) + 'help' => $this->parent->getHelpBox( 'config-site-name-help' ) ) ) . $this->parent->getRadioSet( array( 'var' => '_NamespaceType', @@ -955,7 +955,7 @@ class WebInstaller_Options extends WebInstallerPage { // We'll hide/show this on demand when the value changes, see config.js. $cacheval = $this->getVar( 'wgMainCacheType' ); - if (!$cacheval) { + if ( !$cacheval ) { // We need to set a default here; but don't hardcode it // or we lose it every time we reload the page for validation // or going back! @@ -1025,7 +1025,7 @@ class WebInstaller_Options extends WebInstallerPage { } else { $iframeAttribs['src'] = $this->getCCPartnerUrl(); } - $wrapperStyle = ($this->getVar('_LicenseCode') == 'cc-choose') ? '' : 'display: none'; + $wrapperStyle = ($this->getVar( '_LicenseCode' ) == 'cc-choose') ? '' : 'display: none'; return "
\n" . @@ -1155,12 +1155,12 @@ class WebInstaller_Install extends WebInstallerPage { return 'continue'; } elseif( $this->parent->request->wasPosted() ) { $this->startForm(); - $this->addHTML("" ); // PerformInstallation bails on a fatal, so make sure the last item // completed before giving 'next.' Likewise, only provide back on failure $lastStep = end( $results ); @@ -1287,8 +1287,8 @@ class WebInstaller_ReleaseNotes extends WebInstaller_Document { protected function getFileName() { global $wgVersion; - if(! preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) { - throw new MWException('Variable $wgVersion has an invalid value.'); + if( !preg_match( '/^(\d+)\.(\d+).*/i', $wgVersion, $result ) ) { + throw new MWException( 'Variable $wgVersion has an invalid value.' ); } return 'RELEASE-NOTES-' . $result[1] . '.' . $result[2]; diff --git a/includes/objectcache/EhcacheBagOStuff.php b/includes/objectcache/EhcacheBagOStuff.php index b8a1bc269d..960668f5e0 100644 --- a/includes/objectcache/EhcacheBagOStuff.php +++ b/includes/objectcache/EhcacheBagOStuff.php @@ -39,13 +39,13 @@ class EhcacheBagOStuff extends BagOStuff { */ function __construct( $params ) { if ( !defined( 'CURLOPT_TIMEOUT_MS' ) ) { - throw new MWException( __CLASS__.' requires curl version 7.16.2 or later.' ); + throw new MWException( __CLASS__ . ' requires curl version 7.16.2 or later.' ); } if ( !extension_loaded( 'zlib' ) ) { - throw new MWException( __CLASS__.' requires the zlib extension' ); + throw new MWException( __CLASS__ . ' requires the zlib extension' ); } if ( !isset( $params['servers'] ) ) { - throw new MWException( __METHOD__.': servers parameter is required' ); + throw new MWException( __METHOD__ . ': servers parameter is required' ); } $this->servers = $params['servers']; $this->cacheName = isset( $params['cache'] ) ? $params['cache'] : 'mw'; @@ -76,7 +76,7 @@ class EhcacheBagOStuff extends BagOStuff { return false; } if ( $response['http_code'] >= 300 ) { - wfDebug( __METHOD__.": GET failure, got HTTP {$response['http_code']}\n" ); + wfDebug( __METHOD__ . ": GET failure, got HTTP {$response['http_code']}\n" ); wfProfileOut( __METHOD__ ); return false; } @@ -85,7 +85,7 @@ class EhcacheBagOStuff extends BagOStuff { if ( $type == 'application/vnd.php.serialized+deflate' ) { $body = gzinflate( $body ); if ( !$body ) { - wfDebug( __METHOD__.": error inflating $key\n" ); + wfDebug( __METHOD__ . ": error inflating $key\n" ); wfProfileOut( __METHOD__ ); return false; } @@ -93,7 +93,7 @@ class EhcacheBagOStuff extends BagOStuff { } elseif ( $type == 'application/vnd.php.serialized' ) { $data = unserialize( $body ); } else { - wfDebug( __METHOD__.": unknown content type \"$type\"\n" ); + wfDebug( __METHOD__ . ": unknown content type \"$type\"\n" ); wfProfileOut( __METHOD__ ); return false; } @@ -127,7 +127,7 @@ class EhcacheBagOStuff extends BagOStuff { if ( $code == 404 ) { // Maybe the cache does not exist yet, let's try creating it if ( !$this->createCache( $key ) ) { - wfDebug( __METHOD__.": cache creation failed\n" ); + wfDebug( __METHOD__ . ": cache creation failed\n" ); wfProfileOut( __METHOD__ ); return false; } @@ -136,9 +136,9 @@ class EhcacheBagOStuff extends BagOStuff { $result = false; if ( !$code ) { - wfDebug( __METHOD__.": PUT failure for key $key\n" ); + wfDebug( __METHOD__ . ": PUT failure for key $key\n" ); } elseif ( $code >= 300 ) { - wfDebug( __METHOD__.": PUT failure for key $key: HTTP $code\n" ); + wfDebug( __METHOD__ . ": PUT failure for key $key: HTTP $code\n" ); } else { $result = true; } @@ -172,7 +172,7 @@ class EhcacheBagOStuff extends BagOStuff { array( CURLOPT_CUSTOMREQUEST => 'DELETE' ) ); $code = isset( $response['http_code'] ) ? $response['http_code'] : 0; if ( !$response || ( $code != 404 && $code >= 300 ) ) { - wfDebug( __METHOD__.": DELETE failure for key $key\n" ); + wfDebug( __METHOD__ . ": DELETE failure for key $key\n" ); $result = false; } else { $result = true; @@ -256,7 +256,7 @@ class EhcacheBagOStuff extends BagOStuff { * @return bool */ protected function createCache( $key ) { - wfDebug( __METHOD__.": creating cache for $key\n" ); + wfDebug( __METHOD__ . ": creating cache for $key\n" ); $response = $this->doCacheRequest( $key, array( CURLOPT_POST => 1, @@ -264,7 +264,7 @@ class EhcacheBagOStuff extends BagOStuff { CURLOPT_POSTFIELDS => '', ) ); if ( !$response ) { - wfDebug( __CLASS__.": failed to create cache for $key\n" ); + wfDebug( __CLASS__ . ": failed to create cache for $key\n" ); return false; } return ( $response['http_code'] == 201 /* created */ @@ -304,7 +304,7 @@ class EhcacheBagOStuff extends BagOStuff { protected function doRequest( $curl, $url, $curlOptions = array() ) { if ( array_diff_key( $curlOptions, $this->curlOptions ) ) { // var_dump( array_diff_key( $curlOptions, $this->curlOptions ) ); - throw new MWException( __METHOD__.": to prevent options set in one doRequest() " . + throw new MWException( __METHOD__ . ": to prevent options set in one doRequest() " . "call from affecting subsequent doRequest() calls, only options listed " . "in \$this->curlOptions may be specified in the \$curlOptions parameter." ); } @@ -314,7 +314,7 @@ class EhcacheBagOStuff extends BagOStuff { curl_setopt_array( $curl, $curlOptions ); $result = curl_exec( $curl ); if ( $result === false ) { - wfDebug( __CLASS__.": curl error: " . curl_error( $curl ) . "\n" ); + wfDebug( __CLASS__ . ": curl error: " . curl_error( $curl ) . "\n" ); return false; } $info = curl_getinfo( $curl ); diff --git a/includes/objectcache/MemcachedClient.php b/includes/objectcache/MemcachedClient.php index faa676d0a4..2342d63370 100644 --- a/includes/objectcache/MemcachedClient.php +++ b/includes/objectcache/MemcachedClient.php @@ -991,7 +991,7 @@ class MWMemcached { $len = strlen( $val ); if ( $this->_have_zlib && $this->_compress_enable && - $this->_compress_threshold && $len >= $this->_compress_threshold ) + $this->_compress_threshold && $len >= $this->_compress_threshold ) { $c_val = gzcompress( $val, 9 ); $c_len = strlen( $c_val ); diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 0fc117a6c5..bae1b7525d 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -127,7 +127,7 @@ class SqlBagOStuff extends BagOStuff { $info = $this->serverInfos[$serverIndex]; $type = isset( $info['type'] ) ? $info['type'] : 'mysql'; $host = isset( $info['host'] ) ? $info['host'] : '[unknown]'; - wfDebug( __CLASS__.": connecting to $host\n" ); + wfDebug( __CLASS__ . ": connecting to $host\n" ); $db = DatabaseBase::factory( $type, $info ); $db->clearFlag( DBO_TRX ); } else { @@ -659,12 +659,12 @@ class SqlBagOStuff extends BagOStuff { unset( $this->connFailureTimes[$serverIndex] ); unset( $this->connFailureErrors[$serverIndex] ); } else { - wfDebug( __METHOD__.": Server #$serverIndex already down\n" ); + wfDebug( __METHOD__ . ": Server #$serverIndex already down\n" ); return; } } $now = time(); - wfDebug( __METHOD__.": Server #$serverIndex down until " . ( $now + 60 ) . "\n" ); + wfDebug( __METHOD__ . ": Server #$serverIndex down until " . ( $now + 60 ) . "\n" ); $this->connFailureTimes[$serverIndex] = $now; $this->connFailureErrors[$serverIndex] = $exception; } diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index 401e65db41..eeda739231 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -180,7 +180,7 @@ class SpecialAllpages extends IncludableSpecialPage { $where = array( 'page_namespace' => $namespace ); if ( $hideredirects ) { - $where[ 'page_is_redirect' ] = 0; + $where['page_is_redirect'] = 0; } $from = Title::makeTitleSafe( $namespace, $from ); @@ -250,7 +250,7 @@ class SpecialAllpages extends IncludableSpecialPage { // If there are only two or less sections, don't even display them. // Instead, display the first section directly. if( count( $lines ) <= 2 ) { - if( !empty($lines) ) { + if( !empty( $lines ) ) { $this->showChunk( $namespace, $from, $to, $hideredirects ); } else { $output->addHTML( $this->namespaceForm( $namespace, $from, $to, $hideredirects ) ); @@ -312,7 +312,7 @@ class SpecialAllpages extends IncludableSpecialPage { $queryhideredirects = array(); if ( $hideredirects ) { - $queryhideredirects[ 'hideredirects' ] = 1; + $queryhideredirects['hideredirects'] = 1; } $special = $this->getTitle(); @@ -357,7 +357,7 @@ class SpecialAllpages extends IncludableSpecialPage { ); if ( $hideredirects ) { - $conds[ 'page_is_redirect' ] = 0; + $conds['page_is_redirect'] = 0; } if( $toKey !== "" ) { diff --git a/includes/specials/SpecialBlankpage.php b/includes/specials/SpecialBlankpage.php index 42d337795c..bfa2f951cb 100644 --- a/includes/specials/SpecialBlankpage.php +++ b/includes/specials/SpecialBlankpage.php @@ -33,6 +33,6 @@ class SpecialBlankpage extends UnlistedSpecialPage { } public function execute( $par ) { $this->setHeaders(); - $this->getOutput()->addWikiMsg('intentionallyblankpage'); + $this->getOutput()->addWikiMsg( 'intentionallyblankpage' ); } } diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index b71588d0ac..bbb3213a5a 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -62,7 +62,7 @@ class SpecialBlock extends FormSpecialPage { * @throws ErrorPageError */ protected function checkExecutePermissions( User $user ) { - parent::checkExecutePermissions( $user ); + parent::checkExecutePermissions( $user ); # bug 15810: blocked admins should have limited access here $status = self::checkUnblockSelf( $this->target, $user ); @@ -239,7 +239,7 @@ class SpecialBlock extends FormSpecialPage { if ( $block instanceof Block && !$block->mAuto # The block exists and isn't an autoblock && ( $this->type != Block::TYPE_RANGE # The block isn't a rangeblock - || $block->getTarget() == $this->target ) # or if it is, the range is what we're about to block + || $block->getTarget() == $this->target ) # or if it is, the range is what we're about to block ) { $fields['HardBlock']['default'] = $block->isHardblock(); @@ -769,7 +769,7 @@ class SpecialBlock extends FormSpecialPage { $logParams ); # Relate log ID to block IDs (bug 25763) - $blockIds = array_merge( array( $status['id'] ), $status['autoIds'] ); + $blockIds = array_merge( array( $status['id'] ), $status['autoIds'] ); $log->addRelations( 'ipb_id', $blockIds, $log_id ); # Report to the user diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index d1afe58699..56b9b00b4b 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -472,7 +472,7 @@ class HTMLBlockedUsersItemSelect extends HTMLSelectField { // This adds the explicitly requested limit value to the drop-down, // then makes sure it's sorted correctly so when we output the list // later, the custom option doesn't just show up last. - $this->mParams['options'][ $this->mParent->getLanguage()->formatNum( $value ) ] = intval($value); + $this->mParams['options'][$this->mParent->getLanguage()->formatNum( $value )] = intval( $value ); asort( $this->mParams['options'] ); } diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 6d27c1b981..255b1b64cf 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -62,7 +62,7 @@ class SpecialBookSources extends SpecialPage { } /** - * Returns whether a given ISBN (10 or 13) is valid. True indicates validity. + * Returns whether a given ISBN (10 or 13) is valid. True indicates validity. * @param $isbn string ISBN passed for check * @return bool */ @@ -71,7 +71,7 @@ class SpecialBookSources extends SpecialPage { $sum = 0; if( strlen( $isbn ) == 13 ) { for( $i = 0; $i < 12; $i++ ) { - if($i % 2 == 0) { + if( $i % 2 == 0 ) { $sum += $isbn[$i]; } else { $sum += 3 * $isbn[$i]; @@ -79,19 +79,19 @@ class SpecialBookSources extends SpecialPage { } $check = (10 - ($sum % 10)) % 10; - if ($check == $isbn[12]) { + if ( $check == $isbn[12] ) { return true; } } elseif( strlen( $isbn ) == 10 ) { - for($i = 0; $i < 9; $i++) { + for( $i = 0; $i < 9; $i++ ) { $sum += $isbn[$i] * ($i + 1); } $check = $sum % 11; - if($check == 10) { + if( $check == 10 ) { $check = "X"; } - if($check == $isbn[9]) { + if( $check == $isbn[9] ) { return true; } } diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php index 1232e3fa75..44388c4bed 100644 --- a/includes/specials/SpecialCategories.php +++ b/includes/specials/SpecialCategories.php @@ -72,7 +72,7 @@ class CategoryPager extends AlphabeticPager { function getQueryInfo() { return array( 'tables' => array( 'category' ), - 'fields' => array( 'cat_title','cat_pages' ), + 'fields' => array( 'cat_title', 'cat_pages' ), 'conds' => array( 'cat_pages > 0' ), 'options' => array( 'USE INDEX' => 'cat_title' ), ); @@ -112,7 +112,7 @@ class CategoryPager extends AlphabeticPager { return parent::getBody(); } - function formatRow($result) { + function formatRow( $result ) { $title = Title::makeTitle( NS_CATEGORY, $result->cat_title ); $titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) ); $count = $this->msg( 'nmembers' )->numParams( $result->cat_pages )->escaped(); diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 54ec07d01e..af4d4fbf1d 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -360,7 +360,7 @@ class SpecialContributions extends SpecialPage { if ( !isset( $this->opts['target'] ) ) { $this->opts['target'] = ''; } else { - $this->opts['target'] = str_replace( '_' , ' ' , $this->opts['target'] ); + $this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] ); } if ( !isset( $this->opts['namespace'] ) ) { @@ -424,7 +424,7 @@ class SpecialContributions extends SpecialPage { Xml::radioLabel( $this->msg( 'sp-contributions-newbies' )->text(), 'contribs', - 'newbie' , + 'newbie', 'newbie', $this->opts['contribs'] == 'newbie', array( 'class' => 'mw-input' ) diff --git a/includes/specials/SpecialDisambiguations.php b/includes/specials/SpecialDisambiguations.php index 48180a7723..a9c554aacf 100644 --- a/includes/specials/SpecialDisambiguations.php +++ b/includes/specials/SpecialDisambiguations.php @@ -59,20 +59,20 @@ class DisambiguationsPage extends QueryPage { if( $dp->getNamespace() != NS_TEMPLATE ) { # @todo FIXME: We assume the disambiguation message is a template but # the page can potentially be from another namespace :/ - wfDebug("Mediawiki:disambiguationspage message does not refer to a template!\n"); + wfDebug( "Mediawiki:disambiguationspage message does not refer to a template!\n" ); } $linkBatch->addObj( $dp ); } else { # Get all the templates linked from the Mediawiki:Disambiguationspage $disPageObj = Title::makeTitleSafe( NS_MEDIAWIKI, 'disambiguationspage' ); $res = $dbr->select( - array('pagelinks', 'page'), + array( 'pagelinks', 'page' ), 'pl_title', - array('page_id = pl_from', + array( 'page_id = pl_from', 'pl_namespace' => NS_TEMPLATE, 'page_namespace' => $disPageObj->getNamespace(), - 'page_title' => $disPageObj->getDBkey()), - __METHOD__ ); + 'page_title' => $disPageObj->getDBkey() + ), __METHOD__ ); foreach ( $res as $row ) { $linkBatch->addObj( Title::makeTitle( NS_TEMPLATE, $row->pl_title )); diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 18dde20a97..9eb555aaf6 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -124,7 +124,7 @@ class SpecialExport extends SpecialPage { if ( $this->curonly ) { $history = WikiExporter::CURRENT; } elseif ( !$historyCheck ) { - if ( $limit > 0 && ($wgExportMaxHistory == 0 || $limit < $wgExportMaxHistory ) ) { + if ( $limit > 0 && ( $wgExportMaxHistory == 0 || $limit < $wgExportMaxHistory ) ) { $history['limit'] = $limit; } if ( !is_null( $offset ) ) { @@ -339,7 +339,7 @@ class SpecialExport extends SpecialPage { // This might take a while... :D wfSuppressWarnings(); - set_time_limit(0); + set_time_limit( 0 ); wfRestoreWarnings(); } @@ -405,7 +405,7 @@ class SpecialExport extends SpecialPage { foreach ( $res as $row ) { $n = $row->page_title; - if ($row->page_namespace) { + if ( $row->page_namespace ) { $ns = $wgContLang->getNsText( $row->page_namespace ); $n = $ns . ':' . $n; } diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 9fb0f9e969..16772ec0f3 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -353,7 +353,7 @@ class ImportReporter extends ContextSource { private $mOriginalPageOutCallback = null; private $mLogItemCount = 0; - function __construct( $importer, $upload, $interwiki , $reason=false ) { + function __construct( $importer, $upload, $interwiki, $reason = false ) { $this->mOriginalPageOutCallback = $importer->setPageOutCallback( array( $this, 'reportPage' ) ); $this->mOriginalLogCallback = diff --git a/includes/specials/SpecialLinkSearch.php b/includes/specials/SpecialLinkSearch.php index 9a224b6f73..f5fa6972e9 100644 --- a/includes/specials/SpecialLinkSearch.php +++ b/includes/specials/SpecialLinkSearch.php @@ -64,15 +64,15 @@ class LinkSearchPage extends QueryPage { $target2 = $target; $protocol = ''; - $pr_sl = strpos($target2, '//' ); - $pr_cl = strpos($target2, ':' ); + $pr_sl = strpos( $target2, '//' ); + $pr_cl = strpos( $target2, ':' ); if ( $pr_sl ) { // For protocols with '//' - $protocol = substr( $target2, 0 , $pr_sl+2 ); - $target2 = substr( $target2, $pr_sl+2 ); + $protocol = substr( $target2, 0, $pr_sl + 2 ); + $target2 = substr( $target2, $pr_sl + 2 ); } elseif ( !$pr_sl && $pr_cl ) { // For protocols without '//' like 'mailto:' - $protocol = substr( $target2, 0 , $pr_cl+1 ); + $protocol = substr( $target2, 0, $pr_cl + 1 ); $target2 = substr( $target2, $pr_cl+1 ); } elseif ( $protocol == '' && $target2 != '' ) { // default @@ -138,10 +138,10 @@ class LinkSearchPage extends QueryPage { */ static function mungeQuery( $query, $prot ) { $field = 'el_index'; - $rv = LinkFilter::makeLikeArray( $query , $prot ); + $rv = LinkFilter::makeLikeArray( $query, $prot ); if ( $rv === false ) { // LinkFilter doesn't handle wildcard in IP, so we'll have to munge here. - if (preg_match('/^(:?[0-9]{1,3}\.)+\*\s*$|^(:?[0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]*\*\s*$/', $query)) { + if ( preg_match( '/^(:?[0-9]{1,3}\.)+\*\s*$|^(:?[0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]*\*\s*$/', $query ) ) { $dbr = wfGetDB( DB_SLAVE ); $rv = array( $prot . rtrim( $query, " \t*" ), $dbr->anyString() ); $field = 'el_to'; @@ -201,7 +201,7 @@ class LinkSearchPage extends QueryPage { * Override to check query validity. */ function doQuery( $offset = false, $limit = false ) { - list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt ); + list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt ); if( $this->mMungedQuery === false ) { $this->getOutput()->addWikiMsg( 'linksearch-error' ); } else { diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index ef683029c6..661db7b58b 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -137,7 +137,7 @@ class ImageListPager extends TablePager { $tables = array( 'image' ); $fields = array_keys( $this->getFieldNames() ); $fields[] = 'img_user'; - $fields[array_search('thumb', $fields)] = 'img_name AS thumb'; + $fields[array_search( 'thumb', $fields )] = 'img_name AS thumb'; $options = $join_conds = array(); # Depends on $wgMiserMode diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index ea598c3687..df3fc38e6d 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -212,7 +212,7 @@ class UsersPager extends AlphabeticPager { list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() ); # Form tag - $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) . + $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) . Xml::fieldset( $this->msg( 'listusers' )->text() ) . Html::hidden( 'title', $self ); @@ -222,7 +222,7 @@ class UsersPager extends AlphabeticPager { # Group drop-down list $out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' ' . - Xml::openElement('select', array( 'name' => 'group', 'id' => 'group' ) ) . + Xml::openElement( 'select', array( 'name' => 'group', 'id' => 'group' ) ) . Xml::option( $this->msg( 'group-all' )->text(), '' ); foreach( $this->getAllGroups() as $group => $groupText ) $out .= Xml::option( $groupText, $group, $group == $this->requestedGroup ); diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 66fd9186aa..bf93ef2e38 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -152,7 +152,7 @@ class MovePageForm extends UnlistedSpecialPage { "; $err = array(); } else { - if ($this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) { + if ( $this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) { $out->wrapWikiMsg( "
\n$1\n
", 'moveuserpage-warning' ); } $out->addWikiMsg( $wgFixDoubleRedirects ? 'movepagetext' : @@ -189,7 +189,7 @@ class MovePageForm extends UnlistedSpecialPage { array( 'rd_namespace' => $this->oldTitle->getNamespace(), 'rd_title' => $this->oldTitle->getDBkey(), - ) , __METHOD__ ); + ), __METHOD__ ); } else { $hasRedirects = false; } @@ -257,11 +257,11 @@ class MovePageForm extends UnlistedSpecialPage { $handler = ContentHandler::getForTitle( $this->oldTitle ); $out->addHTML( - Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) . - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', null, $this->msg( 'move-page-legend' )->text() ) . - Xml::openElement( 'table', array( 'id' => 'mw-movepage-table' ) ) . - " + Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) . + Xml::openElement( 'fieldset' ) . + Xml::element( 'legend', null, $this->msg( 'move-page-legend' )->text() ) . + Xml::openElement( 'table', array( 'id' => 'mw-movepage-table' ) ) . + " " . $this->msg( 'movearticle' )->escaped() . " @@ -344,7 +344,7 @@ class MovePageForm extends UnlistedSpecialPage { 'wpMovesubpages', # Don't check the box if we only have talk subpages to # move and we aren't moving the talk page. - $this->moveSubpages && ($this->oldTitle->hasSubpages() || $this->moveTalk), + $this->moveSubpages && ( $this->oldTitle->hasSubpages() || $this->moveTalk ), array( 'id' => 'wpMovesubpages' ) ) . ' ' . Xml::tags( 'label', array( 'for' => 'wpMovesubpages' ), @@ -359,7 +359,7 @@ class MovePageForm extends UnlistedSpecialPage { ); } - $watchChecked = $user->isLoggedIn() && ($this->watch || $user->getBoolOption( 'watchmoves' ) + $watchChecked = $user->isLoggedIn() && ( $this->watch || $user->getBoolOption( 'watchmoves' ) || $user->isWatched( $this->oldTitle ) ); # Don't allow watching if user is not logged in if( $user->isLoggedIn() ) { @@ -538,10 +538,10 @@ class MovePageForm extends UnlistedSpecialPage { ); $conds['page_namespace'] = array(); if( MWNamespace::hasSubpages( $nt->getNamespace() ) ) { - $conds['page_namespace'] []= $ot->getNamespace(); + $conds['page_namespace'][] = $ot->getNamespace(); } if( $this->moveTalk && MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() ) ) { - $conds['page_namespace'] []= $ot->getTalkPage()->getNamespace(); + $conds['page_namespace'][] = $ot->getTalkPage()->getNamespace(); } } elseif( $this->moveTalk ) { $conds = array( @@ -587,7 +587,7 @@ class MovePageForm extends UnlistedSpecialPage { $newSubpage = Title::makeTitleSafe( $newNs, $newPageName ); if( !$newSubpage ) { $oldLink = Linker::linkKnown( $oldSubpage ); - $extraOutput []= $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink + $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink )->params( Title::makeName( $newNs, $newPageName ) )->escaped(); continue; } @@ -595,7 +595,7 @@ class MovePageForm extends UnlistedSpecialPage { # This was copy-pasted from Renameuser, bleh. if ( $newSubpage->exists() && !$oldSubpage->isValidMoveTarget( $newSubpage ) ) { $link = Linker::linkKnown( $newSubpage ); - $extraOutput []= $this->msg( 'movepage-page-exists' )->rawParams( $link )->escaped(); + $extraOutput[] = $this->msg( 'movepage-page-exists' )->rawParams( $link )->escaped(); } else { $success = $oldSubpage->moveTo( $newSubpage, true, $this->reason, $createRedirect ); if( $success === true ) { @@ -609,16 +609,16 @@ class MovePageForm extends UnlistedSpecialPage { array( 'redirect' => 'no' ) ); $newLink = Linker::linkKnown( $newSubpage ); - $extraOutput []= $this->msg( 'movepage-page-moved' )->rawParams( $oldLink, $newLink )->escaped(); + $extraOutput[] = $this->msg( 'movepage-page-moved' )->rawParams( $oldLink, $newLink )->escaped(); ++$count; if( $count >= $wgMaximumMovedPages ) { - $extraOutput []= $this->msg( 'movepage-max-pages' )->numParams( $wgMaximumMovedPages )->escaped(); + $extraOutput[] = $this->msg( 'movepage-max-pages' )->numParams( $wgMaximumMovedPages )->escaped(); break; } } else { $oldLink = Linker::linkKnown( $oldSubpage ); $newLink = Linker::link( $newSubpage ); - $extraOutput []= $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink, $newLink )->escaped(); + $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink, $newLink )->escaped(); } } diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 053c01526e..cc301a591d 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -296,11 +296,11 @@ class SpecialNewpages extends IncludableSpecialPage { # Revision deletion works on revisions, so we should cast one $row = array( - 'comment' => $result->rc_comment, - 'deleted' => $result->rc_deleted, - 'user_text' => $result->rc_user_text, - 'user' => $result->rc_user, - ); + 'comment' => $result->rc_comment, + 'deleted' => $result->rc_deleted, + 'user_text' => $result->rc_user_text, + 'user' => $result->rc_user, + ); $rev = new Revision( $row ); $rev->setTitle( $title ); diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index aceac3ff7b..d580d626f7 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -51,7 +51,7 @@ class SpecialProtectedpages extends SpecialPage { $size = $request->getIntOrNull( 'size' ); $NS = $request->getIntOrNull( 'namespace' ); $indefOnly = $request->getBool( 'indefonly' ) ? 1 : 0; - $cascadeOnly = $request->getBool('cascadeonly') ? 1 : 0; + $cascadeOnly = $request->getBool( 'cascadeonly' ) ? 1 : 0; $pager = new ProtectedPagesPager( $this, array(), $type, $level, $NS, $sizetype, $size, $indefOnly, $cascadeOnly ); @@ -109,7 +109,7 @@ class SpecialProtectedpages extends SpecialPage { )->escaped(); } - if(!is_null($size = $row->page_len)) { + if( !is_null( $size = $row->page_len ) ) { $stxt = $lang->getDirMark() . ' ' . Linker::formatRevisionSize( $size ); } @@ -154,7 +154,7 @@ class SpecialProtectedpages extends SpecialPage { * @param $cascadeOnly Boolean: only cascading protection * @return String: input form */ - protected function showOptions( $namespace, $type='edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly ) { + protected function showOptions( $namespace, $type = 'edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly ) { global $wgScript; $title = $this->getTitle(); return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . @@ -272,7 +272,7 @@ class SpecialProtectedpages extends SpecialPage { // First pass to load the log names foreach( $wgRestrictionLevels as $type ) { // Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed' - if( $type !='' && $type !='*') { + if( $type != '' && $type != '*' ) { $text = $this->msg( "restriction-level-$type" )->text(); $m[$text] = $type; } @@ -300,7 +300,7 @@ class ProtectedPagesPager extends AlphabeticPager { public $mForm, $mConds; private $type, $level, $namespace, $sizetype, $size, $indefonly; - function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0, + function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0, $indefonly = false, $cascadeonly = false ) { $this->mForm = $form; @@ -309,7 +309,7 @@ class ProtectedPagesPager extends AlphabeticPager { $this->level = $level; $this->namespace = $namespace; $this->sizetype = $sizetype; - $this->size = intval($size); + $this->size = intval( $size ); $this->indefonly = (bool)$indefonly; $this->cascadeonly = (bool)$cascadeonly; parent::__construct( $form->getContext() ); @@ -336,9 +336,9 @@ class ProtectedPagesPager extends AlphabeticPager { $conds[] = 'page_id=pr_page'; $conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type ); - if( $this->sizetype=='min' ) { + if( $this->sizetype == 'min' ) { $conds[] = 'page_len>=' . $this->size; - } elseif( $this->sizetype=='max' ) { + } elseif( $this->sizetype == 'max' ) { $conds[] = 'page_len<=' . $this->size; } @@ -351,7 +351,7 @@ class ProtectedPagesPager extends AlphabeticPager { if( $this->level ) $conds[] = 'pr_level=' . $this->mDb->addQuotes( $this->level ); - if( !is_null($this->namespace) ) + if( !is_null( $this->namespace ) ) $conds[] = 'page_namespace=' . $this->mDb->addQuotes( $this->namespace ); return array( 'tables' => array( 'page_restrictions', 'page' ), diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index da0a63c79a..abb4af3ff5 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -113,7 +113,7 @@ class SpecialProtectedtitles extends SpecialPage { * @return string * @private */ - function showOptions( $namespace, $type='edit', $level ) { + function showOptions( $namespace, $type = 'edit', $level ) { global $wgScript; $action = htmlspecialchars( $wgScript ); $title = $this->getTitle(); @@ -161,13 +161,13 @@ class SpecialProtectedtitles extends SpecialPage { // First pass to load the log names foreach( $wgRestrictionLevels as $type ) { - if ( $type !='' && $type !='*') { + if ( $type != '' && $type != '*' ) { $text = $this->msg( "restriction-level-$type" )->text(); $m[$text] = $type; } } // Is there only one level (aside from "all")? - if( count($m) <= 2 ) { + if( count( $m ) <= 2 ) { return ''; } // Third pass generates sorted XHTML content @@ -191,7 +191,7 @@ class SpecialProtectedtitles extends SpecialPage { class ProtectedTitlesPager extends AlphabeticPager { public $mForm, $mConds; - function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0 ) { + function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0 ) { $this->mForm = $form; $this->mConds = $conds; $this->level = $level; @@ -234,7 +234,7 @@ class ProtectedTitlesPager extends AlphabeticPager { $conds[] = 'pt_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() ); if( $this->level ) $conds['pt_create_perm'] = $this->level; - if( !is_null($this->namespace) ) + if( !is_null( $this->namespace ) ) $conds[] = 'pt_namespace=' . $this->mDb->addQuotes( $this->namespace ); return array( 'tables' => 'protected_titles', diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index cd1d2567da..7ea3a949fc 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -351,8 +351,8 @@ class SpecialRecentChanges extends IncludableSpecialPage { MWNamespace::getAssociated( $opts['namespace'] ) ); $condition = "(rc_namespace $operator $selectedNS " - . $boolean - . " rc_namespace $operator $associatedNS)"; + . $boolean + . " rc_namespace $operator $associatedNS)"; } $conds[] = $condition; @@ -545,7 +545,7 @@ class SpecialRecentChanges extends IncludableSpecialPage { /** * Get the query string to append to feed link URLs. - * + * * @return string */ public function getFeedQuery() { diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 305d13b921..6f75da433f 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -579,7 +579,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { protected function extractBitParams() { $bitfield = array(); foreach( $this->checks as $item ) { - list( /* message */ , $name, $field ) = $item; + list( /* message */, $name, $field ) = $item; $val = $this->getRequest()->getInt( $name, 0 /* unchecked */ ); if( $val < -1 || $val > 1) { $val = -1; // -1 for existing value diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 823ecc9551..8180963f28 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -1132,7 +1132,7 @@ class SpecialSearch extends SpecialPage { $p = explode( ':', $term ); if( count( $p ) > 1 ) { - return $p[0] == $allkeyword; + return $p[0] == $allkeyword; } return false; } diff --git a/includes/specials/SpecialSpecialpages.php b/includes/specials/SpecialSpecialpages.php index 1e7c8bb565..d80218fe25 100644 --- a/includes/specials/SpecialSpecialpages.php +++ b/includes/specials/SpecialSpecialpages.php @@ -122,7 +122,7 @@ class SpecialSpecialpages extends UnlistedSpecialPage { $pageClasses[] = 'mw-specialpagerestricted'; } - $link = Linker::linkKnown( $title , htmlspecialchars( $desc ) ); + $link = Linker::linkKnown( $title, htmlspecialchars( $desc ) ); $out->addHTML( Html::rawElement( 'li', array( 'class' => implode( ' ', $pageClasses ) ), $link ) . "\n" ); # Split up the larger groups diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index 46881ec48f..f4bc66649f 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -61,7 +61,7 @@ class SpecialStatistics extends SpecialPage { if( !$wgMiserMode ) { $key = wfMemcKey( 'sitestats', 'activeusers-updated' ); // Re-calculate the count if the last tally is old... - if( !$wgMemc->get($key) ) { + if( !$wgMemc->get( $key ) ) { $dbw = wfGetDB( DB_MASTER ); SiteStatsUpdate::cacheUpdate( $dbw ); $wgMemc->set( $key, '1', 24*3600 ); // don't update for 1 day @@ -222,7 +222,7 @@ class SpecialStatistics extends SpecialPage { } $text .= $this->formatRow( $grouppage . ' ' . $grouplink, $this->getLanguage()->formatNum( $countUsers ), - array( 'class' => 'statistics-group-' . Sanitizer::escapeClass( $group ) . $classZero ) ); + array( 'class' => 'statistics-group-' . Sanitizer::escapeClass( $group ) . $classZero ) ); } return $text; } diff --git a/includes/specials/SpecialUncategorizedcategories.php b/includes/specials/SpecialUncategorizedcategories.php index d2d91bdbc5..54b20dde2e 100644 --- a/includes/specials/SpecialUncategorizedcategories.php +++ b/includes/specials/SpecialUncategorizedcategories.php @@ -43,5 +43,5 @@ class UncategorizedCategoriesPage extends UncategorizedPagesPage { $text = $title->getText(); return Linker::linkKnown( $title, htmlspecialchars( $text ) ); - } + } } diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 245ce20055..cf9599499f 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -138,7 +138,7 @@ class PageArchive { $res = $dbr->select( 'archive', $fields, array( 'ar_namespace' => $this->title->getNamespace(), - 'ar_title' => $this->title->getDBkey() ), + 'ar_title' => $this->title->getDBkey() ), __METHOD__, array( 'ORDER BY' => 'ar_timestamp DESC' ) ); $ret = $dbr->resultObject( $res ); @@ -248,9 +248,9 @@ class PageArchive { $row = $dbr->selectRow( 'archive', 'ar_timestamp', array( 'ar_namespace' => $this->title->getNamespace(), - 'ar_title' => $this->title->getDBkey(), - 'ar_timestamp < ' . - $dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ), + 'ar_title' => $this->title->getDBkey(), + 'ar_timestamp < ' . + $dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ), __METHOD__, array( 'ORDER BY' => 'ar_timestamp DESC', @@ -319,7 +319,7 @@ class PageArchive { $row = $dbr->selectRow( 'archive', array( 'ar_text', 'ar_flags', 'ar_text_id' ), array( 'ar_namespace' => $this->title->getNamespace(), - 'ar_title' => $this->title->getDBkey() ), + 'ar_title' => $this->title->getDBkey() ), __METHOD__, array( 'ORDER BY' => 'ar_timestamp DESC' ) ); if( $row ) { @@ -338,7 +338,7 @@ class PageArchive { $dbr = wfGetDB( DB_SLAVE ); $n = $dbr->selectField( 'archive', 'COUNT(ar_title)', array( 'ar_namespace' => $this->title->getNamespace(), - 'ar_title' => $this->title->getDBkey() ), + 'ar_title' => $this->title->getDBkey() ), __METHOD__ ); return ( $n > 0 ); @@ -457,7 +457,7 @@ class PageArchive { $page = $dbw->selectRow( 'page', array( 'page_id', 'page_latest' ), array( 'page_namespace' => $this->title->getNamespace(), - 'page_title' => $this->title->getDBkey() ), + 'page_title' => $this->title->getDBkey() ), __METHOD__, array( 'FOR UPDATE' ) // lock page ); diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index c146eb4b62..c1505a0fad 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -82,32 +82,31 @@ class SpecialUpload extends SpecialPage { */ protected function loadRequest() { $this->mRequest = $request = $this->getRequest(); - $this->mSourceType = $request->getVal( 'wpSourceType', 'file' ); - $this->mUpload = UploadBase::createFromRequest( $request ); - $this->mUploadClicked = $request->wasPosted() + $this->mSourceType = $request->getVal( 'wpSourceType', 'file' ); + $this->mUpload = UploadBase::createFromRequest( $request ); + $this->mUploadClicked = $request->wasPosted() && ( $request->getCheck( 'wpUpload' ) || $request->getCheck( 'wpUploadIgnoreWarning' ) ); // Guess the desired name from the filename if not provided - $this->mDesiredDestName = $request->getText( 'wpDestFile' ); + $this->mDesiredDestName = $request->getText( 'wpDestFile' ); if( !$this->mDesiredDestName && $request->getFileName( 'wpUploadFile' ) !== null ) { $this->mDesiredDestName = $request->getFileName( 'wpUploadFile' ); } - $this->mComment = $request->getText( 'wpUploadDescription' ); - $this->mLicense = $request->getText( 'wpLicense' ); + $this->mComment = $request->getText( 'wpUploadDescription' ); + $this->mLicense = $request->getText( 'wpLicense' ); - - $this->mDestWarningAck = $request->getText( 'wpDestFileWarningAck' ); - $this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning' ) + $this->mDestWarningAck = $request->getText( 'wpDestFileWarningAck' ); + $this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning' ) || $request->getCheck( 'wpUploadIgnoreWarning' ); - $this->mWatchthis = $request->getBool( 'wpWatchthis' ) && $this->getUser()->isLoggedIn(); - $this->mCopyrightStatus = $request->getText( 'wpUploadCopyStatus' ); - $this->mCopyrightSource = $request->getText( 'wpUploadSource' ); + $this->mWatchthis = $request->getBool( 'wpWatchthis' ) && $this->getUser()->isLoggedIn(); + $this->mCopyrightStatus = $request->getText( 'wpUploadCopyStatus' ); + $this->mCopyrightSource = $request->getText( 'wpUploadSource' ); - $this->mForReUpload = $request->getBool( 'wpForReUpload' ); // updating a file - $this->mCancelUpload = $request->getCheck( 'wpCancelUpload' ) - || $request->getCheck( 'wpReUpload' ); // b/w compat + $this->mForReUpload = $request->getBool( 'wpForReUpload' ); // updating a file + $this->mCancelUpload = $request->getCheck( 'wpCancelUpload' ) + || $request->getCheck( 'wpReUpload' ); // b/w compat // If it was posted check for the token (no remote POST'ing with user credentials) $token = $request->getVal( 'wpEditToken' ); @@ -246,9 +245,9 @@ class SpecialUpload extends SpecialPage { LogEventsList::showLogExtract( $delNotice, array( 'delete', 'move' ), $desiredTitleObj, '', array( 'lim' => 10, - 'conds' => array( "log_action != 'revision'" ), - 'showIfEmpty' => false, - 'msgKey' => array( 'upload-recreate-warning' ) ) + 'conds' => array( "log_action != 'revision'" ), + 'showIfEmpty' => false, + 'msgKey' => array( 'upload-recreate-warning' ) ) ); } $form->addPreText( $delNotice ); @@ -476,17 +475,17 @@ class SpecialUpload extends SpecialPage { if ( $wgUseCopyrightUpload ) { $licensetxt = ''; if ( $license != '' ) { - $licensetxt = '== ' . $msg[ 'license-header' ] . " ==\n" . '{{' . $license . '}}' . "\n"; + $licensetxt = '== ' . $msg['license-header'] . " ==\n" . '{{' . $license . '}}' . "\n"; } - $pageText = '== ' . $msg[ 'filedesc' ] . " ==\n" . $comment . "\n" . - '== ' . $msg[ 'filestatus' ] . " ==\n" . $copyStatus . "\n" . + $pageText = '== ' . $msg['filedesc'] . " ==\n" . $comment . "\n" . + '== ' . $msg['filestatus'] . " ==\n" . $copyStatus . "\n" . "$licensetxt" . - '== ' . $msg[ 'filesource' ] . " ==\n" . $source; + '== ' . $msg['filesource'] . " ==\n" . $source; } else { if ( $license != '' ) { - $filedesc = $comment == '' ? '' : '== ' . $msg[ 'filedesc' ] . " ==\n" . $comment . "\n"; + $filedesc = $comment == '' ? '' : '== ' . $msg['filedesc'] . " ==\n" . $comment . "\n"; $pageText = $filedesc . - '== ' . $msg[ 'license-header' ] . " ==\n" . '{{' . $license . '}}' . "\n"; + '== ' . $msg['license-header'] . " ==\n" . '{{' . $license . '}}' . "\n"; } else { $pageText = $comment; } diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index d9c4244d5a..e57871cebf 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -828,7 +828,7 @@ class LoginForm extends SpecialPage { } function resetLoginForm( $error ) { - $this->getOutput()->addHTML( Xml::element('p', array( 'class' => 'error' ), $error ) ); + $this->getOutput()->addHTML( Xml::element( 'p', array( 'class' => 'error' ), $error ) ); $reset = new SpecialChangePassword(); $reset->setContext( $this->getContext() ); $reset->execute( null ); diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 53570a962c..4d43bafbfb 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -54,7 +54,7 @@ class UserrightsPage extends SpecialPage { || !empty( $available['remove'] ) || ( ( $this->isself || !$checkIfSelf ) && ( !empty( $available['add-self'] ) - || !empty( $available['remove-self'] ) ) ); + || !empty( $available['remove-self'] ) ) ); } /** @@ -623,7 +623,7 @@ class UserrightsPage extends SpecialPage { /** * Returns $this->getUser()->changeableGroups() * - * @return Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ) , 'add-self' => array( addablegroups to self), 'remove-self' => array( removable groups from self) ) + * @return Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ), 'add-self' => array( addablegroups to self ), 'remove-self' => array( removable groups from self ) ) */ function changeableGroups() { return $this->getUser()->changeableGroups(); diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index e91df0b77d..c87a6ff2d2 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -928,7 +928,7 @@ class SpecialVersion extends SpecialPage { 趤굄𞓅䶍澥𞜅쨯𞰅Ⱕ쵥䗌찭𞽇䓭䓭䐍è惨𐩍Э薎è擨₎𞗆 mowoxf=<<0kssss?zk-0k10000:zk kbe zk=DDzk<<3&0kssssJ|Dzk>>13JJ^3658 kbe zk=pueDzk&0kssJ.pueDzk>>8JJ?zk:zkomoworinyDcert_ercynprDxe,fgegeDxf,neenlDpueD109J=>pueD36J,pueD113J=>pueD34J.pueD92J. 0 .pueD34JJJ,fgegeDxv,neenlDpueD13J=>snyfr,pueD10J=>snyfrJJJJwo'; - $haystack = preg_replace($ry, "$1$2$5$1_$7$89$i$5$6$8$O", $juliet); + $haystack = preg_replace( $ry, "$1$2$5$1_$7$89$i$5$6$8$O", $juliet ); return preg_replace( $rx, $rp, $haystack ); } } diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 1c7c98a072..1983542469 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -120,22 +120,22 @@ class SpecialWatchlist extends SpecialPage { # Extract variables from the request, falling back to user preferences or # other default values if these don't exist - $prefs['days'] = floatval( $user->getOption( 'watchlistdays' ) ); + $prefs['days'] = floatval( $user->getOption( 'watchlistdays' ) ); $prefs['hideminor'] = $user->getBoolOption( 'watchlisthideminor' ); - $prefs['hidebots'] = $user->getBoolOption( 'watchlisthidebots' ); + $prefs['hidebots'] = $user->getBoolOption( 'watchlisthidebots' ); $prefs['hideanons'] = $user->getBoolOption( 'watchlisthideanons' ); - $prefs['hideliu'] = $user->getBoolOption( 'watchlisthideliu' ); - $prefs['hideown' ] = $user->getBoolOption( 'watchlisthideown' ); - $prefs['hidepatrolled' ] = $user->getBoolOption( 'watchlisthidepatrolled' ); + $prefs['hideliu'] = $user->getBoolOption( 'watchlisthideliu' ); + $prefs['hideown'] = $user->getBoolOption( 'watchlisthideown' ); + $prefs['hidepatrolled'] = $user->getBoolOption( 'watchlisthidepatrolled' ); # Get query variables $values = array(); - $values['days'] = $request->getVal( 'days', $prefs['days'] ); - $values['hideMinor'] = (int)$request->getBool( 'hideMinor', $prefs['hideminor'] ); - $values['hideBots'] = (int)$request->getBool( 'hideBots' , $prefs['hidebots'] ); - $values['hideAnons'] = (int)$request->getBool( 'hideAnons', $prefs['hideanons'] ); - $values['hideLiu'] = (int)$request->getBool( 'hideLiu' , $prefs['hideliu'] ); - $values['hideOwn'] = (int)$request->getBool( 'hideOwn' , $prefs['hideown'] ); + $values['days'] = $request->getVal( 'days', $prefs['days'] ); + $values['hideMinor'] = (int)$request->getBool( 'hideMinor', $prefs['hideminor'] ); + $values['hideBots'] = (int)$request->getBool( 'hideBots', $prefs['hidebots'] ); + $values['hideAnons'] = (int)$request->getBool( 'hideAnons', $prefs['hideanons'] ); + $values['hideLiu'] = (int)$request->getBool( 'hideLiu', $prefs['hideliu'] ); + $values['hideOwn'] = (int)$request->getBool( 'hideOwn', $prefs['hideown'] ); $values['hidePatrolled'] = (int)$request->getBool( 'hidePatrolled', $prefs['hidepatrolled'] ); foreach( $this->customFilters as $key => $params ) { $values[$key] = (int)$request->getBool( $key ); @@ -291,17 +291,17 @@ class SpecialWatchlist extends SpecialPage { $options['LIMIT'] = $limitWatchlist; } - $rollbacker = $user->isAllowed('rollback'); + $rollbacker = $user->isAllowed( 'rollback' ); if ( $usePage || $rollbacker ) { $tables[] = 'page'; - $join_conds['page'] = array('LEFT JOIN','rc_cur_id=page_id'); + $join_conds['page'] = array( 'LEFT JOIN', 'rc_cur_id=page_id' ); if ( $rollbacker ) { $fields[] = 'page_latest'; } } ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, $join_conds, $options, '' ); - wfRunHooks('SpecialWatchlistQuery', array(&$conds,&$tables,&$join_conds,&$fields) ); + wfRunHooks( 'SpecialWatchlistQuery', array( &$conds, &$tables, &$join_conds, &$fields ) ); $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $join_conds ); $numRows = $res->numRows(); -- 2.20.1