Merge "rebuildLocalisationCache: Implement --lang option"
[lhc/web/wiklou.git] / includes / Article.php
index d2f52bc..87b94ae 100644 (file)
@@ -160,7 +160,7 @@ class Article implements Page {
                $page = null;
                wfRunHooks( 'ArticleFromTitle', array( &$title, &$page ) );
                if ( !$page ) {
-                       switch( $title->getNamespace() ) {
+                       switch ( $title->getNamespace() ) {
                                case NS_FILE:
                                        $page = new ImagePage( $title );
                                        break;
@@ -609,7 +609,7 @@ class Article implements Page {
                $this->mParserOutput = false;
 
                while ( !$outputDone && ++$pass ) {
-                       switch( $pass ) {
+                       switch ( $pass ) {
                                case 1:
                                        wfRunHooks( 'ArticleViewHeader', array( &$this, &$outputDone, &$useParserCache ) );
                                        break;
@@ -673,12 +673,12 @@ class Article implements Page {
                                                wfDebug( __METHOD__ . ": showing CSS/JS source\n" );
                                                $this->showCssOrJsPage();
                                                $outputDone = true;
-                                       } elseif( !wfRunHooks( 'ArticleContentViewCustom',
+                                       } elseif ( !wfRunHooks( 'ArticleContentViewCustom',
                                                        array( $this->fetchContentObject(), $this->getTitle(), $outputPage ) ) ) {
 
                                                # Allow extensions do their own custom view for certain pages
                                                $outputDone = true;
-                                       } elseif( !ContentHandler::runLegacyHooks( 'ArticleViewCustom',
+                                       } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom',
                                                        array( $this->fetchContentObject(), $this->getTitle(), $outputPage ) ) ) {
 
                                                # Allow extensions do their own custom view for certain pages
@@ -875,7 +875,7 @@ class Article implements Page {
                        }
                        if ( Block::newFromTarget( $specificTarget, $vagueTarget ) instanceof Block ) {
                                return array(
-                                       'index'  => 'noindex',
+                                       'index' => 'noindex',
                                        'follow' => 'nofollow'
                                );
                        }
@@ -884,19 +884,19 @@ class Article implements Page {
                if ( $this->mPage->getID() === 0 || $this->getOldID() ) {
                        # Non-articles (special pages etc), and old revisions
                        return array(
-                               'index'  => 'noindex',
+                               'index' => 'noindex',
                                'follow' => 'nofollow'
                        );
                } elseif ( $this->getContext()->getOutput()->isPrintable() ) {
                        # Discourage indexing of printable versions, but encourage following
                        return array(
-                               'index'  => 'noindex',
+                               'index' => 'noindex',
                                'follow' => 'follow'
                        );
                } elseif ( $this->getContext()->getRequest()->getInt( 'curid' ) ) {
                        # For ?curid=x urls, disallow indexing
                        return array(
-                               'index'  => 'noindex',
+                               'index' => 'noindex',
                                'follow' => 'follow'
                        );
                }
@@ -1100,7 +1100,7 @@ class Article implements Page {
                        $user = User::newFromName( $rootPart, false /* allow IP users*/ );
                        $ip = User::isIP( $rootPart );
 
-                       if ( !($user && $user->isLoggedIn()) && !$ip ) { # User does not exist
+                       if ( !( $user && $user->isLoggedIn() ) && !$ip ) { # User does not exist
                                $outputPage->wrapWikiMsg( "<div class=\"mw-userpage-userdoesnotexist error\">\n\$1\n</div>",
                                        array( 'userpage-userdoesnotexist-view', wfEscapeWikiText( $rootPart ) ) );
                        } elseif ( $user->isBlocked() ) { # Show log extract if the user is currently blocked