From: umherirrender Date: Sat, 9 Feb 2013 22:03:53 +0000 (+0100) Subject: fix some spacing X-Git-Tag: 1.31.0-rc.0~20733^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=ca31ebad3fbe7c8b907ff4a4c983f28d2794deb0;p=lhc%2Fweb%2Fwiklou.git fix some spacing Added/removed spaces after opening/before closing parentheses Added a space after a comma Removed unneeded parentheses in condition Change-Id: I306091347ccaaf11dee0cdfda3019cb0c12be51b --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 80c091e9b2..23a3e27a00 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1162,7 +1162,7 @@ class EditPage { return false; case self::AS_PARSE_ERROR: - $wgOut->addWikiText( '
' . $status->getWikiText() . '
'); + $wgOut->addWikiText( '
' . $status->getWikiText() . '
' ); return true; case self::AS_SUCCESS_NEW_ARTICLE: @@ -2197,7 +2197,7 @@ class EditPage { } catch ( MWContentSerializationException $ex ) { // this can't really happen, but be nice if it does. $msg = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() ); - $wgOut->addWikiText( '
' . $msg->text() . '
'); + $wgOut->addWikiText( '
' . $msg->text() . '
' ); } } @@ -2616,7 +2616,7 @@ HTML $this->showDiff(); } catch ( MWContentSerializationException $ex ) { $msg = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() ); - $wgOut->addWikiText( '
' . $msg->text() . '
'); + $wgOut->addWikiText( '
' . $msg->text() . '
' ); } } } diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 66f627513d..2cea7dfa11 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -85,7 +85,7 @@ class FeedUtils { $row->rc_last_oldid, $row->rc_this_oldid, $timestamp, ($row->rc_deleted & Revision::DELETED_COMMENT) - ? wfMessage('rev-deleted-comment')->escaped() + ? wfMessage( 'rev-deleted-comment' )->escaped() : $row->rc_comment, $actiontext ); diff --git a/includes/Html.php b/includes/Html.php index cc9b54b8d5..60be86360d 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -929,7 +929,7 @@ class Html { $icon = $wgStylePath.'/common/images/'.$icon; } - $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class") ); + $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class" ) ); $s .= Html::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ). Html::element( 'img', diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 91c3190fc3..9becca2d31 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -161,7 +161,7 @@ class ImageGallery { * @param $alt String: Alt text for the image * @param $link String: Override image link (optional) */ - function add( $title, $html = '', $alt = '', $link = '') { + function add( $title, $html = '', $alt = '', $link = '' ) { if ( $title instanceof File ) { // Old calling convention $title = $title->getTitle(); diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 953b1f7d03..a3638ccf8b 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -618,7 +618,7 @@ EOT $wrap = "
\n$1\n
\n"; $repo = $this->mPage->getFile()->getRepo()->getDisplayName(); - if ( $descUrl && $descText && wfMessage( 'sharedupload-desc-here' )->plain() !== '-' ) { + if ( $descUrl && $descText && wfMessage( 'sharedupload-desc-here' )->plain() !== '-' ) { $out->wrapWikiMsg( $wrap, array( 'sharedupload-desc-here', $repo, $descUrl ) ); } elseif ( $descUrl && wfMessage( 'sharedupload-desc-there' )->plain() !== '-' ) { $out->wrapWikiMsg( $wrap, array( 'sharedupload-desc-there', $repo, $descUrl ) ); @@ -818,7 +818,7 @@ EOT $ul = Html::rawElement( 'ul', - array( 'class' => 'mw-imagepage-redirectstofile'), + array( 'class' => 'mw-imagepage-redirectstofile' ), $li ) . "\n"; $liContents = wfMessage( 'linkstoimage-redirect' )->rawParams( diff --git a/includes/Import.php b/includes/Import.php index cc642e4501..15e6620556 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -509,7 +509,7 @@ class WikiImporter { while ( $this->reader->read() ) { if ( $this->reader->nodeType == XmlReader::END_ELEMENT && - $this->reader->name == 'logitem') { + $this->reader->name == 'logitem' ) { break; } @@ -572,7 +572,7 @@ class WikiImporter { while ( $skip ? $this->reader->next() : $this->reader->read() ) { if ( $this->reader->nodeType == XmlReader::END_ELEMENT && - $this->reader->name == 'page') { + $this->reader->name == 'page' ) { break; } @@ -626,7 +626,7 @@ class WikiImporter { while ( $skip ? $this->reader->next() : $this->reader->read() ) { if ( $this->reader->nodeType == XmlReader::END_ELEMENT && - $this->reader->name == 'revision') { + $this->reader->name == 'revision' ) { break; } @@ -712,7 +712,7 @@ class WikiImporter { while ( $skip ? $this->reader->next() : $this->reader->read() ) { if ( $this->reader->nodeType == XmlReader::END_ELEMENT && - $this->reader->name == 'upload') { + $this->reader->name == 'upload' ) { break; } @@ -809,7 +809,7 @@ class WikiImporter { while ( $this->reader->read() ) { if ( $this->reader->nodeType == XmlReader::END_ELEMENT && - $this->reader->name == 'contributor') { + $this->reader->name == 'contributor' ) { break; } diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php index 5b884805e6..e787fbd54d 100644 --- a/includes/MimeMagic.php +++ b/includes/MimeMagic.php @@ -701,7 +701,7 @@ class MimeMagic { } if ( $script_type ) { - if ( $script_type !== "UTF-8" && $script_type !== "ASCII") { + if ( $script_type !== "UTF-8" && $script_type !== "ASCII" ) { // Quick and dirty fold down to ASCII! $pack = array( 'UTF-16BE' => 'n*', 'UTF-16LE' => 'v*' ); $chars = unpack( $pack[$script_type], substr( $head, 2 ) ); diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 89d7c0bc3b..577d6105ac 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1873,7 +1873,7 @@ class OutputPage extends ContextSource { wfDebug( __METHOD__ . ": proxy caching with ESI; {$this->mLastModified} **\n", false ); # start with a shorter timeout for initial testing # header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"'); - $response->header( 'Surrogate-Control: max-age=' . $wgSquidMaxage . '+' . $this->mSquidMaxage . ', content="ESI/1.0"'); + $response->header( 'Surrogate-Control: max-age=' . $wgSquidMaxage . '+' . $this->mSquidMaxage . ', content="ESI/1.0"' ); $response->header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' ); } else { # We'll purge the proxy cache for anons explicitly, but require end user agents diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index cf6c10610f..547ffba532 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -1059,10 +1059,10 @@ class Sanitizer { */ static function escapeClass( $class ) { // Convert ugly stuff to underscores and kill underscores in ugly places - return rtrim(preg_replace( - array('/(^[0-9\\-])|[\\x00-\\x20!"#$%&\'()*+,.\\/:;<=>?@[\\]^`{|}~]|\\xC2\\xA0/','/_+/'), + return rtrim( preg_replace( + array( '/(^[0-9\\-])|[\\x00-\\x20!"#$%&\'()*+,.\\/:;<=>?@[\\]^`{|}~]|\\xC2\\xA0/', '/_+/' ), '_', - $class ), '_'); + $class ), '_' ); } /** @@ -1227,7 +1227,7 @@ class Sanitizer { $ret = Sanitizer::normalizeEntity( $matches[1] ); } elseif( $matches[2] != '' ) { $ret = Sanitizer::decCharReference( $matches[2] ); - } elseif( $matches[3] != '' ) { + } elseif( $matches[3] != '' ) { $ret = Sanitizer::hexCharReference( $matches[3] ); } if( is_null( $ret ) ) { @@ -1347,7 +1347,7 @@ class Sanitizer { return Sanitizer::decodeEntity( $matches[1] ); } elseif( $matches[2] != '' ) { return Sanitizer::decodeChar( intval( $matches[2] ) ); - } elseif( $matches[3] != '' ) { + } elseif( $matches[3] != '' ) { return Sanitizer::decodeChar( hexdec( $matches[3] ) ); } # Last case should be an ampersand by itself diff --git a/includes/SqlDataUpdate.php b/includes/SqlDataUpdate.php index d0ead9ad8b..c01cdd02cb 100644 --- a/includes/SqlDataUpdate.php +++ b/includes/SqlDataUpdate.php @@ -76,7 +76,7 @@ abstract class SqlDataUpdate extends DataUpdate { // NOTE: nested transactions are not supported, only start a transaction if none is open if ( $this->mDb->trxLevel() === 0 ) { - $this->mDb->begin( get_class( $this ) . '::beginTransaction' ); + $this->mDb->begin( get_class( $this ) . '::beginTransaction' ); $this->mHasTransaction = true; } } diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 4cc28c3d85..cd43ffb980 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -128,7 +128,7 @@ class WebRequest { global $wgVariantArticlePath, $wgContLang; if( $wgVariantArticlePath ) { $router->add( $wgVariantArticlePath, - array( 'variant' => '$2'), + array( 'variant' => '$2' ), array( '$2' => $wgContLang->getVariants() ) ); } @@ -144,7 +144,7 @@ class WebRequest { // Also reported when ini_get('cgi.fix_pathinfo')==false $matches['title'] = substr( $_SERVER['ORIG_PATH_INFO'], 1 ); - } elseif ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != '') ) { + } elseif ( isset( $_SERVER['PATH_INFO'] ) && $_SERVER['PATH_INFO'] != '' ) { // Regular old PATH_INFO yay $matches['title'] = substr( $_SERVER['PATH_INFO'], 1 ); } diff --git a/includes/WebStart.php b/includes/WebStart.php index 28cc9493ad..48767d00c7 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -27,7 +27,7 @@ # This must be done before any globals are set by the code if ( ini_get( 'register_globals' ) ) { if ( isset( $_REQUEST['GLOBALS'] ) || isset( $_FILES['GLOBALS'] ) ) { - die( '$GLOBALS overwrite vulnerability'); + die( '$GLOBALS overwrite vulnerability' ); } $verboten = array( 'GLOBALS', diff --git a/includes/Xml.php b/includes/Xml.php index 59d422209f..158a6b5b10 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -86,7 +86,7 @@ class Xml { * @param $contents String: NULL to make an open tag only; '' for a contentless closed tag (default) * @return string */ - public static function elementClean( $element, $attribs = array(), $contents = '') { + public static function elementClean( $element, $attribs = array(), $contents = '' ) { global $wgContLang; if( $attribs ) { $attribs = array_map( array( 'UtfNormal', 'cleanUp' ), $attribs ); @@ -764,7 +764,7 @@ class Xml { foreach( $fields as $labelmsg => $input ) { $id = "mw-$labelmsg"; $form .= Xml::openElement( 'tr', array( 'id' => $id ) ); - $form .= Xml::tags( 'td', array( 'class' => 'mw-label'), wfMessage( $labelmsg )->parse() ); + $form .= Xml::tags( 'td', array( 'class' => 'mw-label' ), wfMessage( $labelmsg )->parse() ); $form .= Xml::openElement( 'td', array( 'class' => 'mw-input' ) ) . $input . Xml::closeElement( 'td' ); $form .= Xml::closeElement( 'tr' ); } diff --git a/includes/api/ApiQueryAllImages.php b/includes/api/ApiQueryAllImages.php index b7abb54f29..adf203727d 100644 --- a/includes/api/ApiQueryAllImages.php +++ b/includes/api/ApiQueryAllImages.php @@ -94,7 +94,7 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase { $this->addFields( LocalFile::selectFields() ); $ascendingOrder = true; - if ( $params['dir'] == 'descending' || $params['dir'] == 'older') { + if ( $params['dir'] == 'descending' || $params['dir'] == 'older' ) { $ascendingOrder = false; } diff --git a/includes/api/ApiQueryAllMessages.php b/includes/api/ApiQueryAllMessages.php index fcc3dba7c2..6b6b1a36b6 100644 --- a/includes/api/ApiQueryAllMessages.php +++ b/includes/api/ApiQueryAllMessages.php @@ -116,7 +116,7 @@ class ApiQueryAllMessages extends ApiQueryBase { $lang = $langObj->getCode(); $customisedMessages = AllmessagesTablePager::getCustomisedStatuses( - array_map( array( $langObj, 'ucfirst'), $messages_target ), $lang, $lang != $wgContLang->getCode() ); + array_map( array( $langObj, 'ucfirst' ), $messages_target ), $lang, $lang != $wgContLang->getCode() ); $customised = $params['customised'] === 'modified'; } diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 27d95ee351..31812cffe1 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -76,13 +76,13 @@ class ApiQueryDeletedrevs extends ApiQueryBase { // Ignore namespace and unique due to inability to know whether they were purposely set foreach( array( 'from', 'to', 'prefix', /*'namespace',*/ 'continue', /*'unique'*/ ) as $p ) { if ( !is_null( $params[$p] ) ) { - $this->dieUsage( "The '{$p}' parameter cannot be used in modes 1 or 2", 'badparams'); + $this->dieUsage( "The '{$p}' parameter cannot be used in modes 1 or 2", 'badparams' ); } } } else { foreach( array( 'start', 'end' ) as $p ) { if ( !is_null( $params[$p] ) ) { - $this->dieUsage( "The {$p} parameter cannot be used in mode 3", 'badparams'); + $this->dieUsage( "The {$p} parameter cannot be used in mode 3", 'badparams' ); } } } diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 94b6ad8e95..779720546f 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -96,7 +96,7 @@ class ApiQueryInfo extends ApiQueryBase { 'unblock' => array( 'ApiQueryInfo', 'getUnblockToken' ), 'email' => array( 'ApiQueryInfo', 'getEmailToken' ), 'import' => array( 'ApiQueryInfo', 'getImportToken' ), - 'watch' => array( 'ApiQueryInfo', 'getWatchToken'), + 'watch' => array( 'ApiQueryInfo', 'getWatchToken' ), ); wfRunHooks( 'APIQueryInfoTokens', array( &$this->tokenFunctions ) ); return $this->tokenFunctions; diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 3b4220cbef..3ed0113788 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -530,7 +530,7 @@ class ApiQuerySiteinfo extends ApiQueryBase { public function appendExtensionTags( $property ) { global $wgParser; $wgParser->firstCallInit(); - $tags = array_map( array( $this, 'formatParserTags'), $wgParser->getTags() ); + $tags = array_map( array( $this, 'formatParserTags' ), $wgParser->getTags() ); $this->getResult()->setIndexedTagName( $tags, 't' ); return $this->getResult()->addValue( 'query', $property, $tags ); } diff --git a/includes/api/ApiQueryStashImageInfo.php b/includes/api/ApiQueryStashImageInfo.php index 7128920f07..6899375ac6 100644 --- a/includes/api/ApiQueryStashImageInfo.php +++ b/includes/api/ApiQueryStashImageInfo.php @@ -42,7 +42,7 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo { $result = $this->getResult(); if ( !$params['filekey'] && !$params['sessionkey'] ) { - $this->dieUsage( "One of filekey or sessionkey must be supplied", 'nofilekey'); + $this->dieUsage( "One of filekey or sessionkey must be supplied", 'nofilekey' ); } // Alias sessionkey to filekey, but give an existing filekey precedence. diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index 2627396060..a0da765b8d 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -278,7 +278,7 @@ class ApiUpload extends ApiBase { $fileKey = $stashFile->getFileKey(); } catch ( MWException $e ) { $message = 'Stashing temporary file failed: ' . get_class( $e ) . ' ' . $e->getMessage(); - wfDebug( __METHOD__ . ' ' . $message . "\n"); + wfDebug( __METHOD__ . ' ' . $message . "\n" ); throw new MWException( $message ); } return $fileKey; @@ -658,7 +658,7 @@ class ApiUpload extends ApiBase { protected function checkAsyncDownloadEnabled() { global $wgAllowAsyncCopyUploads; if ( !$wgAllowAsyncCopyUploads ) { - $this->dieUsage( 'Asynchronous copy uploads disabled', 'asynccopyuploaddisabled'); + $this->dieUsage( 'Asynchronous copy uploads disabled', 'asynccopyuploaddisabled' ); } } diff --git a/includes/cache/FileCacheBase.php b/includes/cache/FileCacheBase.php index 1a08d9f2cd..ccdd98a9da 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/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php index 64766466ad..055fd685f2 100644 --- a/includes/cache/HTMLFileCache.php +++ b/includes/cache/HTMLFileCache.php @@ -128,7 +128,7 @@ class HTMLFileCache extends FileCacheBase { public function loadFromFileCache( IContextSource $context ) { global $wgMimeType, $wgLanguageCode; - wfDebug( __METHOD__ . "()\n"); + wfDebug( __METHOD__ . "()\n" ); $filename = $this->cachePath(); $context->getOutput()->sendCacheControl(); diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index bd4ce227ba..89e5325028 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -499,7 +499,7 @@ class MessageCache { // Also delete cached sidebar... just in case it is affected $codes = array( $code ); - if ( $code === 'en' ) { + if ( $code === 'en' ) { // Delete all sidebars, like for example on action=purge on the // sidebar messages $codes = array_keys( Language::fetchLanguageNames() ); diff --git a/includes/content/AbstractContent.php b/includes/content/AbstractContent.php index 7341602e70..e14fb56f7d 100644 --- a/includes/content/AbstractContent.php +++ b/includes/content/AbstractContent.php @@ -338,7 +338,7 @@ abstract class AbstractContent implements Content { * * @since 1.21 */ - public function replaceSection( $section, Content $with, $sectionTitle = '' ) { + public function replaceSection( $section, Content $with, $sectionTitle = '' ) { return null; } diff --git a/includes/content/Content.php b/includes/content/Content.php index 75ac5f2993..31345af3fb 100644 --- a/includes/content/Content.php +++ b/includes/content/Content.php @@ -391,7 +391,7 @@ interface Content { * @param $sectionTitle String: new section's subject, only if $section is 'new' * @return string Complete article text, or null if error */ - public function replaceSection( $section, Content $with, $sectionTitle = '' ); + public function replaceSection( $section, Content $with, $sectionTitle = '' ); /** * Returns a Content object with pre-save transformations applied (or this diff --git a/includes/filerepo/ForeignAPIRepo.php b/includes/filerepo/ForeignAPIRepo.php index e1ecb96046..98a21f741c 100644 --- a/includes/filerepo/ForeignAPIRepo.php +++ b/includes/filerepo/ForeignAPIRepo.php @@ -274,7 +274,7 @@ class ForeignAPIRepo extends FileRepo { } else { if( isset( $knownThumbUrls[$sizekey] ) ) { wfDebug( __METHOD__ . ': Got thumburl from local cache: ' . - "{$knownThumbUrls[$sizekey]} \n"); + "{$knownThumbUrls[$sizekey]} \n" ); return $knownThumbUrls[$sizekey]; } /* This size is not yet known */ diff --git a/includes/filerepo/file/ArchivedFile.php b/includes/filerepo/file/ArchivedFile.php index b02d92b9b3..99b18aa8f4 100644 --- a/includes/filerepo/file/ArchivedFile.php +++ b/includes/filerepo/file/ArchivedFile.php @@ -160,7 +160,7 @@ class ArchivedFile { 'fa_sha1' ), $conds, __METHOD__, - array( 'ORDER BY' => 'fa_timestamp DESC') + array( 'ORDER BY' => 'fa_timestamp DESC' ) ); if ( !$row ) { // this revision does not exist? diff --git a/includes/installer/InstallDocFormatter.php b/includes/installer/InstallDocFormatter.php index 9a389dd8bb..e2fb73588d 100644 --- a/includes/installer/InstallDocFormatter.php +++ b/includes/installer/InstallDocFormatter.php @@ -44,9 +44,9 @@ class InstallDocFormatter { $text = preg_replace( '/^\t\t/m', '::', $text ); $text = preg_replace( '/^\t/m', ':', $text ); // turn (bug nnnn) into links - $text = preg_replace_callback('/bug (\d+)/', array( $this, 'replaceBugLinks' ), $text ); + $text = preg_replace_callback( '/bug (\d+)/', array( $this, 'replaceBugLinks' ), $text ); // add links to manual to every global variable mentioned - $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', array( $this, 'replaceConfigLinks' ), $text ); + $text = preg_replace_callback( '/(\$wg[a-z0-9_]+)/i', array( $this, 'replaceConfigLinks' ), $text ); return $text; } diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 07047f21ba..e126c23ffb 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -1157,7 +1157,7 @@ class WebInstaller_Install extends WebInstallerPage { $this->startForm(); $this->addHTML( "" ); @@ -1176,7 +1176,7 @@ class WebInstaller_Install extends WebInstallerPage { } public function startStage( $step ) { - $this->addHTML( "
  • " . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis')->escaped() ); + $this->addHTML( "
  • " . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis' )->escaped() ); if ( $step == 'extension-tables' ) { $this->startLiveBox(); } diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index d34bf6e244..47b2231924 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -535,7 +535,7 @@ class LogEventsList extends ContextSource { } elseif ( $page != '' ) { $urlParam['page'] = $page; } - if ( $user != '') + if ( $user != '' ) $urlParam['user'] = $user; if ( !is_array( $types ) ) # Make it an array, if it isn't $types = array( $types ); diff --git a/includes/media/Exif.php b/includes/media/Exif.php index 63b21224f5..2dc2eae7bb 100644 --- a/includes/media/Exif.php +++ b/includes/media/Exif.php @@ -387,7 +387,7 @@ class Exif { $this->exifPropToOrd( 'SceneType' ); $this->charCodeString( 'UserComment' ); - $this->charCodeString( 'GPSProcessingMethod'); + $this->charCodeString( 'GPSProcessingMethod' ); $this->charCodeString( 'GPSAreaInformation' ); //ComponentsConfiguration should really be an array instead of a string... @@ -813,13 +813,13 @@ class Exif { } if ( $action === true ) { - wfDebugLog( $this->log, "$class::$fname: accepted: '$in' (type: $type)\n"); + wfDebugLog( $this->log, "$class::$fname: accepted: '$in' (type: $type)\n" ); } elseif ( $action === false ) { - wfDebugLog( $this->log, "$class::$fname: rejected: '$in' (type: $type)\n"); + wfDebugLog( $this->log, "$class::$fname: rejected: '$in' (type: $type)\n" ); } elseif ( $action === null ) { - wfDebugLog( $this->log, "$class::$fname: input was: '$in' (type: $type)\n"); + wfDebugLog( $this->log, "$class::$fname: input was: '$in' (type: $type)\n" ); } else { - wfDebugLog( $this->log, "$class::$fname: $action (type: $type; content: '$in')\n"); + wfDebugLog( $this->log, "$class::$fname: $action (type: $type; content: '$in')\n" ); } } diff --git a/includes/media/ExifBitmap.php b/includes/media/ExifBitmap.php index c34e67b81b..1671ab2584 100644 --- a/includes/media/ExifBitmap.php +++ b/includes/media/ExifBitmap.php @@ -86,7 +86,7 @@ class ExifBitmapHandler extends BitmapHandler { if ( $metadata === self::OLD_BROKEN_FILE ) { # Old special value indicating that there is no EXIF data in the file. # or that there was an error well extracting the metadata. - wfDebug( __METHOD__ . ": back-compat version\n"); + wfDebug( __METHOD__ . ": back-compat version\n" ); return self::METADATA_COMPATIBLE; } if ( $metadata === self::BROKEN_FILE ) { diff --git a/includes/media/IPTC.php b/includes/media/IPTC.php index 3ae59ade6b..06cbc3b04b 100644 --- a/includes/media/IPTC.php +++ b/includes/media/IPTC.php @@ -375,8 +375,8 @@ class IPTC { $dateOnly = true; } - if ( !( preg_match('/\d\d\d\d\d\d[-+]\d\d\d\d/', $time) - && preg_match('/\d\d\d\d\d\d\d\d/', $date) + if ( !( preg_match( '/\d\d\d\d\d\d[-+]\d\d\d\d/', $time ) + && preg_match( '/\d\d\d\d\d\d\d\d/', $date ) && substr( $date, 0, 4 ) !== '0000' && substr( $date, 4, 2 ) !== '00' && substr( $date, 6, 2 ) !== '00' @@ -386,7 +386,7 @@ class IPTC { // for example: the date 00000400 means the photo was taken in // April, but the year and day is unknown. We don't process these // types of incomplete dates atm. - wfDebugLog( 'iptc', "IPTC: invalid time ( $time ) or date ( $date )"); + wfDebugLog( 'iptc', "IPTC: invalid time ( $time ) or date ( $date )" ); return null; } diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index fb305db4cf..46993e7185 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -46,7 +46,7 @@ abstract class MediaHandler { static function getHandler( $type ) { global $wgMediaHandlers; if ( !isset( $wgMediaHandlers[$type] ) ) { - wfDebug( __METHOD__ . ": no handler found for $type.\n"); + wfDebug( __METHOD__ . ": no handler found for $type.\n" ); return false; } $class = $wgMediaHandlers[$type]; diff --git a/includes/media/XMP.php b/includes/media/XMP.php index e4833fc5cd..cd2c39073b 100644 --- a/includes/media/XMP.php +++ b/includes/media/XMP.php @@ -1035,7 +1035,7 @@ class XMPReader { if ( $elm === self::NS_RDF . ' RDF' || $elm === 'adobe:ns:meta/ xmpmeta' - || $elm === 'adobe:ns:meta/ xapmeta') + || $elm === 'adobe:ns:meta/ xapmeta' ) { /* ignore. */ return; @@ -1065,7 +1065,7 @@ class XMPReader { if ( count( $this->mode ) === 0 ) { // This should not happen. - throw new MWException('Error extracting XMP, ' + throw new MWException( 'Error extracting XMP, ' . "encountered <$elm> with no mode" ); } diff --git a/includes/media/XMPValidate.php b/includes/media/XMPValidate.php index 59547e5fd1..e2ae535548 100644 --- a/includes/media/XMPValidate.php +++ b/includes/media/XMPValidate.php @@ -106,12 +106,12 @@ class XMPValidate { // We do < 0 here instead of < -1 here, since // the values between 0 and -1 are also illegal // as -1 is meant as a special reject rating. - wfDebugLog( 'XMP', __METHOD__ . " Rating too low, setting to -1 (Rejected)"); + wfDebugLog( 'XMP', __METHOD__ . " Rating too low, setting to -1 (Rejected)" ); $val = '-1'; return; } if ( $nVal > 5 ) { - wfDebugLog( 'XMP', __METHOD__ . " Rating too high, setting to 5"); + wfDebugLog( 'XMP', __METHOD__ . " Rating too high, setting to 5" ); $val = '5'; return; } diff --git a/includes/normal/Utf8CaseGenerate.php b/includes/normal/Utf8CaseGenerate.php index eaa2304e12..adc3ef22d8 100644 --- a/includes/normal/Utf8CaseGenerate.php +++ b/includes/normal/Utf8CaseGenerate.php @@ -60,7 +60,7 @@ while( false !== ($line = fgets( $in ) ) ) { } fclose( $in ); -$out = fopen("Utf8Case.php", "wt"); +$out = fopen( "Utf8Case.php", "wt" ); if( $out ) { $outUpperChars = escapeArray( $wikiUpperChars ); $outLowerChars = escapeArray( $wikiLowerChars ); diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index e4af26291b..eafa836a4a 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -123,7 +123,7 @@ class ObjectCache { * @return ObjectCache */ static function newAccelerator( $params ) { - if ( function_exists( 'apc_fetch') ) { + if ( function_exists( 'apc_fetch' ) ) { $id = 'apc'; } elseif( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) { $id = 'xcache'; diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index 5e93466571..ff1e0afa58 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -215,7 +215,7 @@ class LinkHolderArray { * @param $prefix String [optional] * @return string */ - function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = '' ) { + function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = '' ) { wfProfileIn( __METHOD__ ); if ( !is_object( $nt ) ) { # Fail gracefully diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index d434e30e31..f23dff4e8b 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1414,7 +1414,7 @@ class Parser { if ( $firstspace == -1 ) { $firstspace = $i; } - } elseif ( $x2 === ' ') { + } elseif ( $x2 === ' ' ) { if ( $firstsingleletterword == -1 ) { $firstsingleletterword = $i; } @@ -2332,7 +2332,7 @@ class Parser { $output .= $this->nextItem( substr( $prefix, -1 ) ); $paragraphStack = false; - if ( substr( $prefix, -1 ) === ';') { + if ( substr( $prefix, -1 ) === ';' ) { # The one nasty exception: definition lists work like this: # ; title : definition text # So we check for : in the remainder text to split up the @@ -2383,7 +2383,7 @@ class Parser { wfProfileIn( __METHOD__ . "-paragraph" ); # No prefix (not in list)--go to paragraph mode # XXX: use a stack for nestable elements like span, table and div - $openmatch = preg_match('/(?:mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/dl|<\\/?center)/iS', $t ); @@ -4104,7 +4104,7 @@ class Parser { $sectionIndex = false; $numbering = ''; $markerMatches = array(); - if ( preg_match("/^$markerRegex/", $headline, $markerMatches ) ) { + if ( preg_match( "/^$markerRegex/", $headline, $markerMatches ) ) { $serial = $markerMatches[1]; list( $titleText, $sectionIndex ) = $this->mHeadings[$serial]; $isTemplate = ( $titleText != $baseTitleText ); @@ -5235,7 +5235,7 @@ class Parser { } else { # Inline image if ( !isset( $params['frame']['alt'] ) ) { # No alt text, use the "caption" for the alt text - if ( $caption !== '') { + if ( $caption !== '' ) { $params['frame']['alt'] = $this->stripAltText( $caption, $holders ); } else { # No caption, fall back to using the filename for the diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 9eb555aaf6..506d80dbea 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -80,7 +80,7 @@ class SpecialExport extends SpecialPage { $page = $request->getText( 'pages' ); $nsindex = $request->getText( 'nsindex', '' ); - if ( strval( $nsindex ) !== '' ) { + if ( strval( $nsindex ) !== '' ) { /** * Same implementation as above, so same @todo */ diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 06e32610ed..3265d1a7dd 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -116,7 +116,7 @@ class UsersPager extends AlphabeticPager { $options['GROUP BY'] = $this->creationSort ? 'user_id' : 'user_name'; $query = array( - 'tables' => array( 'user', 'user_groups', 'ipblocks'), + 'tables' => array( 'user', 'user_groups', 'ipblocks' ), 'fields' => array( 'user_name' => $this->creationSort ? 'MAX(user_name)' : 'user_name', 'user_id' => $this->creationSort ? 'user_id' : 'MAX(user_id)', diff --git a/includes/specials/SpecialPopularpages.php b/includes/specials/SpecialPopularpages.php index 5a9f3f70b1..99b586ec0f 100644 --- a/includes/specials/SpecialPopularpages.php +++ b/includes/specials/SpecialPopularpages.php @@ -46,7 +46,7 @@ class PopularPagesPage extends QueryPage { 'tables' => array( 'page' ), 'fields' => array( 'namespace' => 'page_namespace', 'title' => 'page_title', - 'value' => 'page_counter'), + 'value' => 'page_counter' ), 'conds' => array( 'page_is_redirect' => 0, 'page_namespace' => MWNamespace::getContentNamespaces() ) ); } diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index f486ea83f6..e1e18e4db5 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -241,7 +241,7 @@ class SpecialPrefixindex extends SpecialAllpages { 'hideredirects' => $hideredirects, ); - if( $namespace || ($prefix == '')) { + if( $namespace || $prefix == '' ) { // Keep the namespace even if it's 0 for empty prefixes. // This tells us we're not just a holdover from old links. $query['namespace'] = $namespace; diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 8180963f28..4f8437f5a0 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -455,7 +455,7 @@ class SpecialSearch extends SpecialPage { # Should advanced UI be used? $this->searchAdvanced = ($this->profile === 'advanced'); $out = $this->getOutput(); - if( strval( $term ) !== '' ) { + if( strval( $term ) !== '' ) { $out->setPageTitle( $this->msg( 'searchresults' ) ); $out->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams( $this->msg( 'searchresults-title' )->rawParams( $term )->text() diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 4eb30ee119..3a37f11c92 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -360,7 +360,7 @@ abstract class UploadBase { global $wgVerifyMimeType; wfProfileIn( __METHOD__ ); if ( $wgVerifyMimeType ) { - wfDebug ( "\n\nmime: <$mime> extension: <{$this->mFinalExtension}>\n\n"); + wfDebug ( "\n\nmime: <$mime> extension: <{$this->mFinalExtension}>\n\n" ); global $wgMimeTypeBlacklist; if ( $this->checkFileExtension( $mime, $wgMimeTypeBlacklist ) ) { wfProfileOut( __METHOD__ );