From 355f9f200e4e2955283eee35be42a163b2dacc04 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Thu, 24 Jan 2008 01:59:35 +0000 Subject: [PATCH] Commit some junk: spacing, braces, parentheses, other stylistic stuff. --- includes/EditPage.php | 7 +++---- includes/OutputPage.php | 2 +- includes/Title.php | 9 ++++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 61e58d2105..62ef5a725d 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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: diff --git a/includes/OutputPage.php b/includes/OutputPage.php index abefda6c77..a2e1198456 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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) ) { diff --git a/includes/Title.php b/includes/Title.php index af3fd27734..b858b2664a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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 { -- 2.20.1