| " .
Xml::openElement( 'fieldset' ) .
Xml::element( 'legend', null, $msg->exists() ? $msg->text() : $action ) .
Xml::openElement( 'table', array( 'id' => "mw-protect-table-$action" ) ) .
diff --git a/includes/SiteStats.php b/includes/SiteStats.php
index b7be29d6344..4de73331950 100644
--- a/includes/SiteStats.php
+++ b/includes/SiteStats.php
@@ -306,12 +306,12 @@ class SiteStatsUpdate implements DeferrableUpdate {
}
$pd = $this->getPendingDeltas();
// Piggy-back the async deltas onto those of this stats update....
- $this->views += ( $pd['ss_total_views']['+'] - $pd['ss_total_views']['-'] );
- $this->edits += ( $pd['ss_total_edits']['+'] - $pd['ss_total_edits']['-'] );
+ $this->views += ( $pd['ss_total_views']['+'] - $pd['ss_total_views']['-'] );
+ $this->edits += ( $pd['ss_total_edits']['+'] - $pd['ss_total_edits']['-'] );
$this->articles += ( $pd['ss_good_articles']['+'] - $pd['ss_good_articles']['-'] );
- $this->pages += ( $pd['ss_total_pages']['+'] - $pd['ss_total_pages']['-'] );
- $this->users += ( $pd['ss_users']['+'] - $pd['ss_users']['-'] );
- $this->images += ( $pd['ss_images']['+'] - $pd['ss_images']['-'] );
+ $this->pages += ( $pd['ss_total_pages']['+'] - $pd['ss_total_pages']['-'] );
+ $this->users += ( $pd['ss_users']['+'] - $pd['ss_users']['-'] );
+ $this->images += ( $pd['ss_images']['+'] - $pd['ss_images']['-'] );
}
// Need a separate transaction because this a global lock
@@ -356,7 +356,7 @@ class SiteStatsUpdate implements DeferrableUpdate {
'rc_user != 0',
'rc_bot' => 0,
'rc_log_type != ' . $dbr->addQuotes( 'newusers' ) . ' OR rc_log_type IS NULL',
- 'rc_timestamp >= ' . $dbr->addQuotes( $dbr->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays*24*3600 ) ),
+ 'rc_timestamp >= ' . $dbr->addQuotes( $dbr->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays * 24 * 3600 ) ),
),
__METHOD__
);
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index fee3058ac15..9014c7fe755 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -127,7 +127,7 @@ class SkinTemplate extends Skin {
*
* @param $out OutputPage
*/
- function outputPage( OutputPage $out=null ) {
+ function outputPage( OutputPage $out = null ) {
global $wgContLang;
global $wgScript, $wgStylePath;
global $wgMimeType, $wgJsMimeType;
@@ -761,7 +761,7 @@ class SkinTemplate extends Skin {
function makeArticleUrlDetails( $name, $urlaction = '' ) {
$title = Title::newFromText( $name );
- $title= $title->getSubjectPage();
+ $title = $title->getSubjectPage();
self::checkTitle( $title, $name );
return array(
'href' => $title->getLocalURL( $urlaction ),
diff --git a/includes/Status.php b/includes/Status.php
index 5d6236f7c0b..d8ea24ae1bc 100644
--- a/includes/Status.php
+++ b/includes/Status.php
@@ -190,7 +190,7 @@ class Status {
$s = wfMessage( $longContext, "* $s\n" )->plain();
}
} else {
- $s = '* '. implode( "\n* ",
+ $s = '* ' . implode( "\n* ",
$this->getErrorMessageArray( $this->errors ) ) . "\n";
if ( $longContext ) {
$s = wfMessage( $longContext, $s )->plain();
diff --git a/includes/StringUtils.php b/includes/StringUtils.php
index f4c98f1d54e..21a392a856f 100644
--- a/includes/StringUtils.php
+++ b/includes/StringUtils.php
@@ -452,16 +452,16 @@ class ReplacementArray {
*/
function replace( $subject ) {
if ( function_exists( 'fss_prep_replace' ) ) {
- wfProfileIn( __METHOD__.'-fss' );
+ wfProfileIn( __METHOD__ . '-fss' );
if ( $this->fss === false ) {
$this->fss = fss_prep_replace( $this->data );
}
$result = fss_exec_replace( $this->fss, $subject );
- wfProfileOut( __METHOD__.'-fss' );
+ wfProfileOut( __METHOD__ . '-fss' );
} else {
- wfProfileIn( __METHOD__.'-strtr' );
+ wfProfileIn( __METHOD__ . '-strtr' );
$result = strtr( $subject, $this->data );
- wfProfileOut( __METHOD__.'-strtr' );
+ wfProfileOut( __METHOD__ . '-strtr' );
}
return $result;
}
diff --git a/includes/UIDGenerator.php b/includes/UIDGenerator.php
index b042d8c7181..6219b3dc8e3 100644
--- a/includes/UIDGenerator.php
+++ b/includes/UIDGenerator.php
@@ -304,7 +304,7 @@ class UIDGenerator {
if ( $ct >= $time ) { // http://php.net/manual/en/language.operators.comparison.php
return $ct; // current timestamp is higher than $time
}
- } while ( ( ( $time[0] - $ct[0] )*1000 + ( $time[1] - $ct[1] ) ) <= 10 );
+ } while ( ( ( $time[0] - $ct[0] ) * 1000 + ( $time[1] - $ct[1] ) ) <= 10 );
return false;
}
diff --git a/includes/User.php b/includes/User.php
index 5b7cbf2e9c6..ed97deb2e71 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1229,7 +1229,7 @@ class User {
$defOpt['variant'] = $wgContLang->getCode();
$defOpt['language'] = $wgContLang->getCode();
foreach( SearchEngine::searchableNamespaces() as $nsnum => $nsname ) {
- $defOpt['searchNs'.$nsnum] = !empty( $wgNamespacesToBeSearchedDefault[$nsnum] );
+ $defOpt['searchNs' . $nsnum] = !empty( $wgNamespacesToBeSearchedDefault[$nsnum] );
}
$defOpt['skin'] = $wgDefaultSkin;
@@ -1268,7 +1268,7 @@ class User {
}
wfProfileIn( __METHOD__ );
- wfDebug( __METHOD__.": checking...\n" );
+ wfDebug( __METHOD__ . ": checking...\n" );
// Initialize data...
// Otherwise something ends up stomping on $this->mBlockedby when
@@ -3244,7 +3244,7 @@ class User {
}
}
if ( !$loaded ) {
- throw new MWException( __METHOD__. ": hit a key conflict attempting " .
+ throw new MWException( __METHOD__ . ": hit a key conflict attempting " .
"to insert a user row, but then it doesn't exist when we select it!" );
}
return Status::newFatal( 'userexists' );
@@ -4254,7 +4254,7 @@ class User {
} elseif ( $type == ':B:' ) {
# Salted
list( $salt, $realHash ) = explode( ':', substr( $hash, 3 ), 2 );
- return md5( $salt.'-'.md5( $password ) ) === $realHash;
+ return md5( $salt . '-' . md5( $password ) ) === $realHash;
} else {
# Old-style
return self::oldCrypt( $password, $userId ) === $hash;
diff --git a/includes/WikiMap.php b/includes/WikiMap.php
index a1dbbfc098c..ab3d68d634e 100644
--- a/includes/WikiMap.php
+++ b/includes/WikiMap.php
@@ -73,7 +73,7 @@ class WikiMap {
* @param string $text link's text; optional, default to "User:$user"
* @return String: HTML link or false if the wiki was not found
*/
- public static function foreignUserLink( $wikiID, $user, $text=null ) {
+ public static function foreignUserLink( $wikiID, $user, $text = null ) {
return self::makeForeignLink( $wikiID, "User:$user", $text );
}
@@ -85,7 +85,7 @@ class WikiMap {
* @param string $text link's text; optional, default to $page
* @return String: HTML link or false if the wiki was not found
*/
- public static function makeForeignLink( $wikiID, $page, $text=null ) {
+ public static function makeForeignLink( $wikiID, $page, $text = null ) {
if ( !$text ) {
$text = $page;
}
diff --git a/includes/WikiPage.php b/includes/WikiPage.php
index c016b18cf3a..228f295b318 100644
--- a/includes/WikiPage.php
+++ b/includes/WikiPage.php
@@ -797,7 +797,7 @@ class WikiPage implements Page, IDBAccessObject {
public function setCachedLastEditTime( $timestamp ) {
global $wgMemc;
$key = wfMemcKey( 'page-lastedit', md5( $this->mTitle->getPrefixedDBkey() ) );
- $wgMemc->set( $key, wfTimestamp( TS_MW, $timestamp ), 60*15 );
+ $wgMemc->set( $key, wfTimestamp( TS_MW, $timestamp ), 60 * 15 );
}
/**
diff --git a/includes/Xml.php b/includes/Xml.php
index 7cecf3af2ee..29c240eb1d9 100644
--- a/includes/Xml.php
+++ b/includes/Xml.php
@@ -200,9 +200,9 @@ class Xml {
$encYear = '';
}
$inputAttribs = array( 'id' => 'year', 'maxlength' => 4, 'size' => 7 );
- return self::label( wfMessage( 'year' )->text(), 'year' ) . ' '.
- Html::input( 'year', $encYear, 'number', $inputAttribs ) . ' '.
- self::label( wfMessage( 'month' )->text(), 'month' ) . ' '.
+ return self::label( wfMessage( 'year' )->text(), 'year' ) . ' ' .
+ Html::input( 'year', $encYear, 'number', $inputAttribs ) . ' ' .
+ self::label( wfMessage( 'month' )->text(), 'month' ) . ' ' .
self::monthSelector( $encMonth, -1 );
}
@@ -330,7 +330,7 @@ class Xml {
* @param array $attribs other attributes
* @return string HTML
*/
- public static function check( $name, $checked = false, $attribs=array() ) {
+ public static function check( $name, $checked = false, $attribs = array() ) {
return self::element( 'input', array_merge(
array(
'name' => $name,
@@ -389,7 +389,7 @@ class Xml {
* @param array $attribs other attributes
* @return string HTML
*/
- public static function inputLabel( $label, $name, $id, $size=false, $value=false, $attribs = array() ) {
+ public static function inputLabel( $label, $name, $id, $size = false, $value = false, $attribs = array() ) {
list( $label, $input ) = self::inputLabelSep( $label, $name, $id, $size, $value, $attribs );
return $label . ' ' . $input;
}
@@ -466,7 +466,7 @@ class Xml {
* @param array $attribs optional additional HTML attributes
* @return string HTML
*/
- public static function option( $text, $value=null, $selected = false,
+ public static function option( $text, $value = null, $selected = false,
$attribs = array() ) {
if( !is_null( $value ) ) {
$attribs['value'] = $value;
@@ -488,7 +488,7 @@ class Xml {
* @param $tabindex Mixed: Value of the tabindex attribute
* @return string
*/
- public static function listDropDown( $name= '', $list = '', $other = '', $selected = '', $class = '', $tabindex = null ) {
+ public static function listDropDown( $name = '', $list = '', $other = '', $selected = '', $class = '', $tabindex = null ) {
$optgroup = false;
$options = self::option( $other, 'other', $selected === 'other' );
diff --git a/includes/XmlTypeCheck.php b/includes/XmlTypeCheck.php
index 2e184606dae..5e4f1189cc3 100644
--- a/includes/XmlTypeCheck.php
+++ b/includes/XmlTypeCheck.php
@@ -47,7 +47,7 @@ class XmlTypeCheck {
* namespace, name, and attributes, but not to text contents.
* Filter should return 'true' to toggle on $this->filterMatch
*/
- function __construct( $file, $filterCallback=null ) {
+ function __construct( $file, $filterCallback = null ) {
$this->filterCallback = $filterCallback;
$this->run( $file );
}
diff --git a/includes/ZipDirectoryReader.php b/includes/ZipDirectoryReader.php
index 646180d2f10..307efcea8de 100644
--- a/includes/ZipDirectoryReader.php
+++ b/includes/ZipDirectoryReader.php
@@ -162,7 +162,7 @@ class ZipDirectoryReader {
|| $this->eocdr['CD entries total'] == 0xffff )
{
$this->error( 'zip-unsupported', 'Central directory header indicates ZIP64, ' .
- 'but we are in legacy mode. Rejecting this upload is necessary to avoid '.
+ 'but we are in legacy mode. Rejecting this upload is necessary to avoid ' .
'opening vulnerabilities on clients using OpenJDK 7 or later.' );
}
diff --git a/includes/actions/HistoryAction.php b/includes/actions/HistoryAction.php
index 87294261f91..72961264a5d 100644
--- a/includes/actions/HistoryAction.php
+++ b/includes/actions/HistoryAction.php
@@ -661,7 +661,7 @@ class HistoryPager extends ReverseChronologicalPager {
wfRunHooks( 'HistoryRevisionTools', array( $rev, &$tools ) );
if ( $tools ) {
- $s2 .= ' '. $this->msg( 'parentheses' )->rawParams( $lang->pipeList( $tools ) )->escaped();
+ $s2 .= ' ' . $this->msg( 'parentheses' )->rawParams( $lang->pipeList( $tools ) )->escaped();
}
# Tags
diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index 4916145bc15..ab600081538 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -100,7 +100,7 @@ class ApiEditPage extends ApiBase {
$name = $titleObj->getPrefixedDBkey();
$model = $contentHandler->getModelID();
- $this->dieUsage( "The requested format $contentFormat is not supported for content model ".
+ $this->dieUsage( "The requested format $contentFormat is not supported for content model " .
" $model used by $name", 'badformat' );
}
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index abd47b20ebf..76f9b4201ab 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -863,7 +863,7 @@ class ApiMain extends ApiBase {
' ' . $request->getMethod() .
' ' . wfUrlencode( str_replace( ' ', '_', $this->getUser()->getName() ) ) .
' ' . $request->getIP() .
- ' T=' . $milliseconds .'ms';
+ ' T=' . $milliseconds . 'ms';
foreach ( $this->getParamsUsed() as $name ) {
$value = $request->getVal( $name );
if ( $value === null ) {
diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php
index 192fe873f43..317b7ba57c9 100644
--- a/includes/api/ApiQueryRevisions.php
+++ b/includes/api/ApiQueryRevisions.php
@@ -550,7 +550,7 @@ class ApiQueryRevisions extends ApiQueryBase {
if ( !$content->isSupportedFormat( $format ) ) {
$name = $title->getPrefixedDBkey();
- $this->dieUsage( "The requested format {$this->contentFormat} is not supported ".
+ $this->dieUsage( "The requested format {$this->contentFormat} is not supported " .
"for content model $model used by $name", 'badformat' );
}
@@ -593,7 +593,7 @@ class ApiQueryRevisions extends ApiQueryBase {
$name = $title->getPrefixedDBkey();
- $this->dieUsage( "The requested format {$this->contentFormat} is not supported for ".
+ $this->dieUsage( "The requested format {$this->contentFormat} is not supported for " .
"content model $model used by $name", 'badformat' );
}
diff --git a/includes/cache/FileCacheBase.php b/includes/cache/FileCacheBase.php
index 30a72174b07..74feffb1230 100644
--- a/includes/cache/FileCacheBase.php
+++ b/includes/cache/FileCacheBase.php
@@ -163,7 +163,7 @@ abstract class FileCacheBase {
$this->checkCacheDirs(); // build parent dir
if ( !file_put_contents( $this->cachePath(), $text, LOCK_EX ) ) {
- wfDebug( __METHOD__ . "() failed saving ". $this->cachePath() . "\n" );
+ wfDebug( __METHOD__ . "() failed saving " . $this->cachePath() . "\n" );
$this->mCached = null;
return false;
}
diff --git a/includes/clientpool/RedisConnectionPool.php b/includes/clientpool/RedisConnectionPool.php
index a15e80ba80c..7a291540ca8 100644
--- a/includes/clientpool/RedisConnectionPool.php
+++ b/includes/clientpool/RedisConnectionPool.php
@@ -59,7 +59,7 @@ class RedisConnectionPool {
*/
protected function __construct( array $options ) {
if ( !extension_loaded( 'redis' ) ) {
- throw new MWException( __CLASS__. ' requires the phpredis extension: ' .
+ throw new MWException( __CLASS__ . ' requires the phpredis extension: ' .
'https://github.com/nicolasff/phpredis' );
}
$this->connectTimeout = $options['connectTimeout'];
@@ -164,7 +164,7 @@ class RedisConnectionPool {
// TCP connection
$hostPort = IP::splitHostAndPort( $server );
if ( !$hostPort ) {
- throw new MWException( __CLASS__.": invalid configured server \"$server\"" );
+ throw new MWException( __CLASS__ . ": invalid configured server \"$server\"" );
}
list( $host, $port ) = $hostPort;
if ( $port === false ) {
diff --git a/includes/db/DatabaseError.php b/includes/db/DatabaseError.php
index 628a2afca5b..55095c38294 100644
--- a/includes/db/DatabaseError.php
+++ b/includes/db/DatabaseError.php
@@ -188,7 +188,7 @@ class DBConnectionError extends DBError {
# Hack: extend the body for error messages
$cache = str_replace( array( ' |