Added a pile of missing brackets
authorjeroendedauw <jeroendedauw@gmail.com>
Thu, 27 Sep 2012 19:46:22 +0000 (21:46 +0200)
committerjeroendedauw <jeroendedauw@gmail.com>
Thu, 27 Sep 2012 19:46:22 +0000 (21:46 +0200)
Change-Id: Id7b331e1b12875736c8e7e93660e71630360a723

includes/Article.php
includes/BacklinkCache.php
includes/Cdb.php
includes/ChangeTags.php
includes/ChangesList.php
includes/EditPage.php
includes/ExternalStore.php
includes/FileDeleteForm.php
includes/Licenses.php

index 9ab4b6b..76e566b 100644 (file)
@@ -1764,8 +1764,9 @@ class Article extends Page {
                wfDeprecated( __METHOD__, '1.18' );
                if ( $noRedir ) {
                        $query = 'redirect=no';
-                       if ( $extraQuery )
+                       if ( $extraQuery ) {
                                $query .= "&$extraQuery";
+                       }
                } else {
                        $query = $extraQuery;
                }
index 05bf318..d2055dd 100644 (file)
@@ -287,8 +287,9 @@ class BacklinkCache {
                        default:
                                $conds = null;
                                wfRunHooks( 'BacklinkCacheGetConditions', array( $table, $this->title, &$conds ) );
-                               if( !$conds )
+                               if( !$conds ) {
                                        throw new MWException( "Invalid table \"$table\" in " . __CLASS__ );
+                               }
                }
 
                return $conds;
index ae2e5b1..2a6a3d2 100644 (file)
@@ -133,8 +133,9 @@ class CdbReader_DBA {
        }
 
        function close() {
-               if( isset($this->handle) )
+               if( isset($this->handle) ) {
                        dba_close( $this->handle );
+               }
                unset( $this->handle );
        }
 
@@ -164,8 +165,9 @@ class CdbWriter_DBA {
        }
 
        function close() {
-               if( isset($this->handle) )
+               if( isset($this->handle) ) {
                        dba_close( $this->handle );
+               }
                if ( wfIsWindows() ) {
                        unlink( $this->realFileName );
                }
index 0ebc926..a97cb03 100644 (file)
@@ -224,8 +224,9 @@ class ChangeTags {
        public static function buildTagFilterSelector( $selected='', $fullForm = false, Title $title = null ) {
                global $wgUseTagFilter;
 
-               if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) )
+               if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) {
                        return $fullForm ? '' : array();
+               }
 
                $data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMessage( 'tag-filter' )->parse() ),
                        Xml::input( 'tagfilter', 20, $selected, array( 'class' => 'mw-tagfilter-input' ) ) );
index 8467712..e7395c0 100644 (file)
@@ -1058,8 +1058,9 @@ class EnhancedChangesList extends ChangesList {
                                                array(),
                                                $params
                                        );
-                               if( $this->isDeleted($rcObj,Revision::DELETED_TEXT) )
+                               if( $this->isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
                                        $link = '<span class="history-deleted">'.$link.'</span> ';
+                               }
                        }
                        $r .= $link . '</span>';
 
index 84695b1..c138824 100644 (file)
@@ -392,10 +392,14 @@ class EditPage {
                                wfProfileOut( __METHOD__ );
                                return;
                        }
-                       if ( !$this->mTitle->getArticleID() )
+
+                       if ( !$this->mTitle->getArticleID() ) {
                                wfRunHooks( 'EditFormPreloadText', array( &$this->textbox1, &$this->mTitle ) );
-                       else
+                       }
+                       else {
                                wfRunHooks( 'EditFormInitialText', array( $this ) );
+                       }
+
                }
 
                $this->showEditForm();
@@ -586,8 +590,10 @@ class EditPage {
                                // modified by subclasses
                                wfProfileIn( get_class( $this ) . "::importContentFormData" );
                                $textbox1 = $this->importContentFormData( $request );
-                               if ( isset( $textbox1 ) )
+                               if ( isset( $textbox1 ) ) {
                                        $this->textbox1 = $textbox1;
+                               }
+
                                wfProfileOut( get_class( $this ) . "::importContentFormData" );
                        }
 
@@ -2014,10 +2020,13 @@ class EditPage {
                                        $wgOut->wrapWikiMsg( "<div class='error' id='mw-userinvalidcssjstitle'>\n$1\n</div>", array( 'userinvalidcssjstitle', $this->mTitle->getSkinFromCssJsSubpage() ) );
                                }
                                if ( $this->formtype !== 'preview' ) {
-                                       if ( $this->isCssSubpage )
+                                       if ( $this->isCssSubpage ) {
                                                $wgOut->wrapWikiMsg( "<div id='mw-usercssyoucanpreview'>\n$1\n</div>", array( 'usercssyoucanpreview' ) );
-                                       if ( $this->isJsSubpage )
+                                       }
+
+                                       if ( $this->isJsSubpage ) {
                                                $wgOut->wrapWikiMsg( "<div id='mw-userjsyoucanpreview'>\n$1\n</div>", array( 'userjsyoucanpreview' ) );
+                                       }
                                }
                        }
                }
@@ -2148,14 +2157,16 @@ class EditPage {
         * @return String
         */
        protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) {
-               if ( !$summary || ( !$this->preview && !$this->diff ) )
+               if ( !$summary || ( !$this->preview && !$this->diff ) ) {
                        return "";
+               }
 
                global $wgParser;
 
-               if ( $isSubjectPreview )
+               if ( $isSubjectPreview ) {
                        $summary = wfMessage( 'newsectionsummary', $wgParser->stripSectionName( $summary ) )
                                ->inContentLanguage()->text();
+               }
 
                $message = $isSubjectPreview ? 'subject-preview' : 'summary-preview';
 
@@ -2174,8 +2185,9 @@ class EditPage {
 
 HTML
                );
-               if ( !$this->checkUnicodeCompliantBrowser() )
+               if ( !$this->checkUnicodeCompliantBrowser() ) {
                        $wgOut->addHTML( Html::hidden( 'safemode', '1' ) );
+               }
        }
 
        protected function showFormAfterText() {
@@ -2285,13 +2297,15 @@ HTML
        protected function displayPreviewArea( $previewOutput, $isOnTop = false ) {
                global $wgOut;
                $classes = array();
-               if ( $isOnTop )
+               if ( $isOnTop ) {
                        $classes[] = 'ontop';
+               }
 
                $attribs = array( 'id' => 'wikiPreview', 'class' => implode( ' ', $classes ) );
 
-               if ( $this->formtype != 'preview' )
+               if ( $this->formtype != 'preview' ) {
                        $attribs['style'] = 'display: none;';
+               }
 
                $wgOut->addHTML( Xml::openElement( 'div', $attribs ) );
 
@@ -2568,10 +2582,13 @@ HTML
                );
                // Quick paranoid permission checks...
                if ( is_object( $data ) ) {
-                       if ( $data->log_deleted & LogPage::DELETED_USER )
+                       if ( $data->log_deleted & LogPage::DELETED_USER ) {
                                $data->user_name = wfMessage( 'rev-deleted-user' )->escaped();
-                       if ( $data->log_deleted & LogPage::DELETED_COMMENT )
+                       }
+
+                       if ( $data->log_deleted & LogPage::DELETED_COMMENT ) {
                                $data->log_comment = wfMessage( 'rev-deleted-comment' )->escaped();
+                       }
                }
                return $data;
        }
index 61d4ef7..391829a 100644 (file)
@@ -50,8 +50,9 @@ class ExternalStore {
        static function fetchFromURL( $url, $params = array() ) {
                global $wgExternalStores;
 
-               if( !$wgExternalStores )
+               if( !$wgExternalStores ) {
                        return false;
+               }
 
                $parts = explode( '://', $url, 2 );
 
@@ -66,8 +67,10 @@ class ExternalStore {
                }
 
                $store = self::getStoreObject( $proto, $params );
-               if ( $store === false )
+               if ( $store === false ) {
                        return false;
+               }
+
                return $store->fetchFromURL( $url );
        }
 
@@ -80,11 +83,14 @@ class ExternalStore {
         */
        static function getStoreObject( $proto, $params = array() ) {
                global $wgExternalStores;
-               if( !$wgExternalStores )
+               if( !$wgExternalStores ) {
                        return false;
+               }
+
                /* Protocol not enabled */
-               if( !in_array( $proto, $wgExternalStores ) )
+               if( !in_array( $proto, $wgExternalStores ) ) {
                        return false;
+               }
 
                $class = 'ExternalStore' . ucfirst( $proto );
                /* Any custom modules should be added to $wgAutoLoadClasses for on-demand loading */
index e75ad72..7e616b2 100644 (file)
@@ -374,8 +374,9 @@ class FileDeleteForm {
                $q = array();
                $q['action'] = 'delete';
 
-               if( $this->oldimage )
+               if( $this->oldimage ) {
                        $q['oldimage'] = $this->oldimage;
+               }
 
                return $this->title->getLocalUrl( $q );
        }
index ba504a9..4d2229f 100644 (file)
@@ -117,7 +117,7 @@ class Licenses extends HTMLFormField {
         * @param $depth int
         */
        protected function makeHtml( $tagset, $depth = 0 ) {
-               foreach ( $tagset as $key => $val )
+               foreach ( $tagset as $key => $val ) {
                        if ( is_array( $val ) ) {
                                $this->html .= $this->outputOption(
                                        $key, '',
@@ -135,6 +135,7 @@ class Licenses extends HTMLFormField {
                                        $depth
                                );
                        }
+               }
        }
 
        /**
@@ -148,8 +149,10 @@ class Licenses extends HTMLFormField {
                $msgObj = $this->msg( $message );
                $text = $msgObj->exists() ? $msgObj->text() : $message;
                $attribs['value'] = $value;
-               if ( $value === $this->selected )
+               if ( $value === $this->selected ) {
                        $attribs['selected'] = 'selected';
+               }
+
                $val = str_repeat( /* &nbsp */ "\xc2\xa0", $depth * 2 ) . $text;
                return str_repeat( "\t", $depth ) . Xml::element( 'option', $attribs, $val ) . "\n";
        }