fix some spacing
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 9 Feb 2013 22:03:53 +0000 (23:03 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 9 Feb 2013 22:03:53 +0000 (23:03 +0100)
Added/removed spaces after opening/before closing parentheses

Added a space after a comma

Removed unneeded parentheses in condition

Change-Id: I306091347ccaaf11dee0cdfda3019cb0c12be51b

46 files changed:
includes/EditPage.php
includes/FeedUtils.php
includes/Html.php
includes/ImageGallery.php
includes/ImagePage.php
includes/Import.php
includes/MimeMagic.php
includes/OutputPage.php
includes/Sanitizer.php
includes/SqlDataUpdate.php
includes/WebRequest.php
includes/WebStart.php
includes/Xml.php
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryAllMessages.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryInfo.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiQueryStashImageInfo.php
includes/api/ApiUpload.php
includes/cache/FileCacheBase.php
includes/cache/HTMLFileCache.php
includes/cache/MessageCache.php
includes/content/AbstractContent.php
includes/content/Content.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/file/ArchivedFile.php
includes/installer/InstallDocFormatter.php
includes/installer/WebInstallerPage.php
includes/logging/LogEventsList.php
includes/media/Exif.php
includes/media/ExifBitmap.php
includes/media/IPTC.php
includes/media/MediaHandler.php
includes/media/XMP.php
includes/media/XMPValidate.php
includes/normal/Utf8CaseGenerate.php
includes/objectcache/ObjectCache.php
includes/parser/LinkHolderArray.php
includes/parser/Parser.php
includes/specials/SpecialExport.php
includes/specials/SpecialListusers.php
includes/specials/SpecialPopularpages.php
includes/specials/SpecialPrefixindex.php
includes/specials/SpecialSearch.php
includes/upload/UploadBase.php

index 80c091e..23a3e27 100644 (file)
@@ -1162,7 +1162,7 @@ class EditPage {
                                return false;
 
                        case self::AS_PARSE_ERROR:
-                               $wgOut->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>');
+                               $wgOut->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>' );
                                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( '<div class="error">' . $msg->text() . '</div>');
+                               $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>' );
                        }
                }
 
@@ -2616,7 +2616,7 @@ HTML
                                $this->showDiff();
                        } catch ( MWContentSerializationException $ex ) {
                                $msg = wfMessage( 'content-failed-to-parse', $this->contentModel, $this->contentFormat, $ex->getMessage() );
-                               $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>');
+                               $wgOut->addWikiText( '<div class="error">' . $msg->text() . '</div>' );
                        }
                }
        }
index 66f6275..2cea7df 100644 (file)
@@ -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
                );
index cc9b54b..60be863 100644 (file)
@@ -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',
index 91c3190..9becca2 100644 (file)
@@ -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();
index 953b1f7..a3638cc 100644 (file)
@@ -618,7 +618,7 @@ EOT
                $wrap = "<div class=\"sharedUploadNotice\">\n$1\n</div>\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(
index cc642e4..15e6620 100644 (file)
@@ -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;
                        }
 
index 5b88480..e787fbd 100644 (file)
@@ -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 ) );
index 89d7c0b..577d610 100644 (file)
@@ -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
index cf6c106..547ffba 100644 (file)
@@ -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
index d0ead9a..c01cdd0 100644 (file)
@@ -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;
                }
        }
index 4cc28c3..cd43ffb 100644 (file)
@@ -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 );
                        }
index 28cc949..48767d0 100644 (file)
@@ -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( '<a href="http://www.hardened-php.net/globals-problem">$GLOBALS overwrite vulnerability</a>');
+               die( '<a href="http://www.hardened-php.net/globals-problem">$GLOBALS overwrite vulnerability</a>' );
        }
        $verboten = array(
                'GLOBALS',
index 59d4222..158a6b5 100644 (file)
@@ -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' );
                }
index b7abb54..adf2037 100644 (file)
@@ -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;
                }
 
index fcc3dba..6b6b1a3 100644 (file)
@@ -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';
                }
index 27d95ee..31812cf 100644 (file)
@@ -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' );
                                }
                        }
                }
index 94b6ad8..7797205 100644 (file)
@@ -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;
index 3b4220c..3ed0113 100644 (file)
@@ -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 );
        }
index 7128920..6899375 100644 (file)
@@ -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.
index 2627396..a0da765 100644 (file)
@@ -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' );
                }
        }
 
index 1a08d9f..ccdd98a 100644 (file)
@@ -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;
                }
index 6476646..055fd68 100644 (file)
@@ -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();
index bd4ce22..89e5325 100644 (file)
@@ -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() );
index 7341602..e14fb56 100644 (file)
@@ -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;
        }
 
index 75ac5f2..31345af 100644 (file)
@@ -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
index e1ecb96..98a21f7 100644 (file)
@@ -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 */
index b02d92b..99b18aa 100644 (file)
@@ -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?
index 9a389dd..e2fb735 100644 (file)
@@ -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;
        }
 
index 07047f2..e126c23 100644 (file)
@@ -1157,7 +1157,7 @@ class WebInstaller_Install extends WebInstallerPage {
                        $this->startForm();
                        $this->addHTML( "<ul>" );
                        $results = $this->parent->performInstallation(
-                               array( $this, 'startStage'),
+                               array( $this, 'startStage' ),
                                array( $this, 'endStage' )
                        );
                        $this->addHTML( "</ul>" );
@@ -1176,7 +1176,7 @@ class WebInstaller_Install extends WebInstallerPage {
        }
 
        public function startStage( $step ) {
-               $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis')->escaped() );
+               $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis' )->escaped() );
                if ( $step == 'extension-tables' ) {
                        $this->startLiveBox();
                }
index d34bf6e..47b2231 100644 (file)
@@ -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 );
index 63b2122..2dc2eae 100644 (file)
@@ -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" );
                }
        }
 
index c34e67b..1671ab2 100644 (file)
@@ -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 ) {
index 3ae59ad..06cbc3b 100644 (file)
@@ -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;
                }
 
index fb305db..46993e7 100644 (file)
@@ -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];
index e4833fc..cd2c390 100644 (file)
@@ -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" );
                }
 
index 59547e5..e2ae535 100644 (file)
@@ -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;
                        }
index eaa2304..adc3ef2 100644 (file)
@@ -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 );
index e4af262..eafa836 100644 (file)
@@ -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';
index 5e93466..ff1e0af 100644 (file)
@@ -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
index d434e30..f23dff4 100644 (file)
@@ -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('/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
+                               $openmatch = preg_match( '/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<dl|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
                                $closematch = preg_match(
                                        '/(?:<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
                                        '<td|<th|<\\/?div|<hr|<\\/pre|<\\/p|'.$this->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
index 9eb555a..506d80d 100644 (file)
@@ -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
                                 */
index 06e3261..3265d1a 100644 (file)
@@ -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)',
index 5a9f3f7..99b586e 100644 (file)
@@ -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() ) );
        }
index f486ea8..e1e18e4 100644 (file)
@@ -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;
index 8180963..4f8437f 100644 (file)
@@ -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()
index 4eb30ee..3a37f11 100644 (file)
@@ -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__ );