Commit some junk: spacing, braces, parentheses, other stylistic stuff.
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 24 Jan 2008 01:59:35 +0000 (01:59 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 24 Jan 2008 01:59:35 +0000 (01:59 +0000)
includes/EditPage.php
includes/OutputPage.php
includes/Title.php

index 61e58d2..62ef5a7 100644 (file)
@@ -802,7 +802,7 @@ class EditPage {
                        }
 
                        # Don't save a new article if it's blank.
-                       if ( ( '' == $this->textbox1 ) ) {
+                       if ( '' == $this->textbox1 ) {
                                        wfProfileOut( $fname );
                                        return self::AS_BLANK_ARTICLE;
                        }
@@ -2183,8 +2183,7 @@ END
                        $this->didSave = true;
                }
 
-               switch ($value)
-               {
+               switch ($value) {
                        case self::AS_HOOK_ERROR_EXPECTED:
                        case self::AS_CONTENT_TOO_BIG:
                        case self::AS_ARTICLE_WAS_DELETED:
@@ -2194,7 +2193,7 @@ END
                        case self::AS_MAX_ARTICLE_SIZE_EXCEDED:
                        case self::AS_END:
                                return true;
-                       
+
                        case self::AS_HOOK_ERROR:
                        case self::AS_FILTERING:
                        case self::AS_SUCCESS_NEW_ARTICLE:
index abefda6..a2e1198 100644 (file)
@@ -1031,7 +1031,7 @@ class OutputPage {
 
                $this->setRobotpolicy( 'noindex,nofollow' );
                $this->setArticleRelated( false );
-               
+
                // If no reason is given, just supply a default "I can't let you do
                // that, Dave" message.  Should only occur if called by legacy code.
                if ( $protected && empty($reasons) ) {
index af3fd27..b858b26 100644 (file)
@@ -673,7 +673,7 @@ class Title {
         */
        public function getBaseText() {
                global $wgNamespacesWithSubpages;
-               if( isset( $wgNamespacesWithSubpages[ $this->mNamespace ] ) && $wgNamespacesWithSubpages[ $this->mNamespace ] ) {
+               if( !empty( $wgNamespacesWithSubpages[$this->mNamespace] ) ) {
                        $parts = explode( '/', $this->getText() );
                        # Don't discard the real title if there's no subpage involved
                        if( count( $parts ) > 1 )
@@ -797,16 +797,15 @@ class Title {
                } else {
                        $dbkey = wfUrlencode( $this->getPrefixedDBkey() );
                        if ( $query == '' ) {
-                               if($variant!=false && $wgContLang->hasVariants()){
-                                       if($wgVariantArticlePath==false) {
+                               if( $variant != false && $wgContLang->hasVariants() ) {
+                                       if( $wgVariantArticlePath == false ) {
                                                $variantArticlePath =  "$wgScript?title=$1&variant=$2"; // default
                                        } else {
                                                $variantArticlePath = $wgVariantArticlePath;
                                        }
                                        $url = str_replace( '$2', urlencode( $variant ), $variantArticlePath );
                                        $url = str_replace( '$1', $dbkey, $url  );
-                               }
-                               else {
+                               } else {
                                        $url = str_replace( '$1', $dbkey, $wgArticlePath );
                                }
                        } else {