Fixed spacing in skins folder
authorumherirrender <umherirrender_de.wp@web.de>
Mon, 15 Apr 2013 19:38:16 +0000 (21:38 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Mon, 15 Apr 2013 19:38:16 +0000 (21:38 +0200)
Added spaces inside function calls
Added spaces before if, foreach
Replaced endif, endforeach with curly braces
Added some braces for one line statements

Change-Id: If934d5343ae28b1b54451754cb78358b213ea71c

resources/Resources.php
skins/CologneBlue.php
skins/Modern.php
skins/MonoBook.php
skins/Vector.php

index 7e1e3a3..c96184e 100644 (file)
@@ -20,7 +20,7 @@
  * @file
  */
 
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
        die( 'Not an entry point.' );
 }
 
@@ -902,7 +902,7 @@ return array(
        ),
        'mediawiki.special.preferences' => array(
                'scripts' => 'resources/mediawiki.special/mediawiki.special.preferences.js',
-               'styles'  => 'resources/mediawiki.special/mediawiki.special.preferences.css',
+               'styles' => 'resources/mediawiki.special/mediawiki.special.preferences.css',
        ),
        'mediawiki.special.recentchanges' => array(
                'scripts' => 'resources/mediawiki.special/mediawiki.special.recentchanges.js',
index c5f9389..1669de7 100644 (file)
@@ -22,7 +22,7 @@
  * @ingroup Skins
  */
 
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
        die( -1 );
 }
 
@@ -533,16 +533,16 @@ class CologneBlueTemplate extends BaseTemplate {
                $search = $this->getSkin()->getRequest()->getText( 'search' );
                $action = $this->data['searchaction'];
                $s = "<form id=\"searchform-" . htmlspecialchars($which) . "\" method=\"get\" class=\"inline\" action=\"$action\">";
-               if( $which == 'footer' ) {
+               if ( $which == 'footer' ) {
                        $s .= wfMessage( 'qbfind' )->text() . ": ";
                }
 
                $s .= "<input type='text' class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
                        . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />"
-                       . ($which == 'footer' ? " " : "<br />")
+                       . ( $which == 'footer' ? " " : "<br />" )
                        . "<input type='submit' class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />";
 
-               if( $wgUseTwoButtonsSearchForm ) {
+               if ( $wgUseTwoButtonsSearchForm ) {
                        $s .= " <input type='submit' class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'searchbutton' )->escaped() . "\" />\n";
                } else {
                        $s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n";
index 9dbefb1..9177895 100644 (file)
@@ -22,8 +22,9 @@
  * @ingroup Skins
  */
 
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
        die( -1 );
+}
 
 /**
  * Inherit main code from SkinTemplate, set the CSS and template filter.
@@ -39,7 +40,7 @@ class SkinModern extends SkinTemplate {
         */
        function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
-               $out->addModuleStyles ('skins.modern');
+               $out->addModuleStyles( 'skins.modern' );
        }
 }
 
@@ -68,7 +69,7 @@ class ModernTemplate extends MonoBookTemplate {
        <div id="mw_header"><h1 id="firstHeading" lang="<?php
                $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
                $this->html( 'pageLanguage' );
-       ?>"><span dir="auto"><?php $this->html('title') ?></span></h1></div>
+       ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1></div>
 
        <div id="mw_main">
        <div id="mw_contentwrapper">
@@ -82,30 +83,30 @@ class ModernTemplate extends MonoBookTemplate {
             for the margins -->
        <div id="mw_contentholder" class="mw-body">
                <div class='mw-topboxes'>
-                       <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes')?>></div>
-                       <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div>
-                       <?php if($this->data['newtalk'] ) {
-                               ?><div class="usermessage mw-topbox"><?php $this->html('newtalk')  ?></div>
+                       <div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' )?>></div>
+                       <div class="mw-topbox" id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+                       <?php if ( $this->data['newtalk'] ) {
+                               ?><div class="usermessage mw-topbox"><?php $this->html( 'newtalk' ) ?></div>
                        <?php } ?>
-                       <?php if($this->data['sitenotice']) {
-                               ?><div class="mw-topbox" id="siteNotice"><?php $this->html('sitenotice') ?></div>
+                       <?php if ( $this->data['sitenotice'] ) {
+                               ?><div class="mw-topbox" id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
                        <?php } ?>
                </div>
 
-               <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
+               <div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
 
-               <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php     $this->html('undelete') ?></div><?php } ?>
-               <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
+               <?php if ( $this->data['undelete'] ) { ?><div id="contentSub2"><?php $this->html( 'undelete' ) ?></div><?php } ?>
+               <?php if ( $this->data['showjumplinks'] ) { ?><div id="jump-to-nav"><?php $this->msg( 'jumpto' ) ?> <a href="#mw_portlets"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div><?php } ?>
 
-               <?php $this->html('bodytext') ?>
+               <?php $this->html( 'bodytext' ) ?>
                <div class='mw_clear'></div>
-               <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
-               <?php $this->html ('dataAfterContent') ?>
+               <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
+               <?php $this->html( 'dataAfterContent' ) ?>
        </div><!-- mw_contentholder -->
        </div><!-- mw_content -->
        </div><!-- mw_contentwrapper -->
 
-       <div id="mw_portlets"<?php $this->html("userlangattributes") ?>>
+       <div id="mw_portlets"<?php $this->html( "userlangattributes" ) ?>>
        <h2><?php $this->msg( 'navigation-heading' ) ?></h2>
 
        <!-- portlets -->
@@ -120,11 +121,11 @@ class ModernTemplate extends MonoBookTemplate {
 
        <!-- personal portlet -->
        <div class="portlet" id="p-personal" role="navigation">
-               <h3><?php $this->msg('personaltools') ?></h3>
+               <h3><?php $this->msg( 'personaltools' ) ?></h3>
                <div class="pBody">
                        <ul>
-<?php          foreach($this->getPersonalTools() as $key => $item) { ?>
-                               <?php echo $this->makeListItem($key, $item); ?>
+<?php          foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+                               <?php echo $this->makeListItem( $key, $item ); ?>
 
 <?php          } ?>
                        </ul>
@@ -133,19 +134,19 @@ class ModernTemplate extends MonoBookTemplate {
 
 
        <!-- footer -->
-       <div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
+       <div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
                        <ul id="f-list">
 <?php
-               foreach( $this->getFooterLinks("flat") as $aLink ) {
-                       if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
+               foreach ( $this->getFooterLinks( "flat" ) as $aLink ) {
+                       if ( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
 ?>                             <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
 <?php          }
                }
 ?>
                        </ul>
 <?php
-               foreach ( $this->getFooterIcons("nocopyright") as $blockName => $footerIcons ) { ?>
-                       <div id="mw_<?php echo htmlspecialchars($blockName); ?>">
+               foreach ( $this->getFooterIcons( "nocopyright" ) as $blockName => $footerIcons ) { ?>
+                       <div id="mw_<?php echo htmlspecialchars( $blockName ); ?>">
 <?php
                        foreach ( $footerIcons as $icon ) { ?>
                                <?php echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?>
index ecbcd70..b704173 100644 (file)
@@ -25,8 +25,9 @@
  * @ingroup Skins
  */
 
-if( !defined( 'MEDIAWIKI' ) )
+if ( !defined( 'MEDIAWIKI' ) ) {
        die( -1 );
+}
 
 /**
  * Inherit main code from SkinTemplate, set the CSS and template filter.
@@ -48,7 +49,7 @@ class SkinMonoBook extends SkinTemplate {
                $out->addModuleStyles( 'skins.monobook' );
 
                // Ugh. Can't do this properly because $wgHandheldStyle may be a URL
-               if( $wgHandheldStyle ) {
+               if ( $wgHandheldStyle ) {
                        // Currently in testing... try 'chick/main.css'
                        $out->addStyle( $wgHandheldStyle, 'handheld' );
                }
@@ -82,39 +83,39 @@ class MonoBookTemplate extends BaseTemplate {
 ?><div id="globalWrapper">
 <div id="column-content"><div id="content" class="mw-body-primary" role="main">
        <a id="top"></a>
-       <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+       <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div><?php } ?>
 
        <h1 id="firstHeading" class="firstHeading" lang="<?php
                $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
                $this->html( 'pageLanguage' );
-       ?>"><span dir="auto"><?php $this->html('title') ?></span></h1>
+       ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
        <div id="bodyContent" class="mw-body">
-               <div id="siteSub"><?php $this->msg('tagline') ?></div>
-               <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
-<?php if($this->data['undelete']) { ?>
-               <div id="contentSub2"><?php $this->html('undelete') ?></div>
-<?php } ?><?php if($this->data['newtalk'] ) { ?>
-               <div class="usermessage"><?php $this->html('newtalk')  ?></div>
-<?php } ?><?php if($this->data['showjumplinks']) { ?>
-               <div id="jump-to-nav" class="mw-jump"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div>
+               <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+               <div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
+<?php if ( $this->data['undelete'] ) { ?>
+               <div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
+<?php } ?><?php if ( $this->data['newtalk'] ) { ?>
+               <div class="usermessage"><?php $this->html( 'newtalk' )  ?></div>
+<?php } ?><?php if ( $this->data['showjumplinks'] ) { ?>
+               <div id="jump-to-nav" class="mw-jump"><?php $this->msg( 'jumpto' ) ?> <a href="#column-one"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?><a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a></div>
 <?php } ?>
                <!-- start content -->
-<?php $this->html('bodytext') ?>
-               <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
+<?php $this->html( 'bodytext' ) ?>
+               <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
                <!-- end content -->
-               <?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
+               <?php if ( $this->data['dataAfterContent'] ) { $this->html( 'dataAfterContent' ); } ?>
                <div class="visualClear"></div>
        </div>
 </div></div>
-<div id="column-one"<?php $this->html('userlangattributes')  ?>>
+<div id="column-one"<?php $this->html( 'userlangattributes' )  ?>>
        <h2><?php $this->msg( 'navigation-heading' ) ?></h2>
 <?php $this->cactions(); ?>
        <div class="portlet" id="p-personal" role="navigation">
-               <h3><?php $this->msg('personaltools') ?></h3>
+               <h3><?php $this->msg( 'personaltools' ) ?></h3>
                <div class="pBody">
-                       <ul<?php $this->html('userlangattributes') ?>>
-<?php          foreach($this->getPersonalTools() as $key => $item) { ?>
-                               <?php echo $this->makeListItem($key, $item); ?>
+                       <ul<?php $this->html( 'userlangattributes' ) ?>>
+<?php          foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+                               <?php echo $this->makeListItem( $key, $item ); ?>
 
 <?php          } ?>
                        </ul>
@@ -125,7 +126,7 @@ class MonoBookTemplate extends BaseTemplate {
                        echo Html::element( 'a', array(
                                'href' => $this->data['nav_urls']['mainpage']['href'],
                                'style' => "background-image: url({$this->data['logopath']});" )
-                               + Linker::tooltipAndAccesskeyAttribs('p-logo') ); ?>
+                               + Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ); ?>
 
        </div>
 <?php
@@ -138,7 +139,7 @@ class MonoBookTemplate extends BaseTemplate {
        $validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
 
        if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
-<div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
+<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
 <?php
                $footerEnd = '</div>';
        } else {
@@ -157,7 +158,7 @@ class MonoBookTemplate extends BaseTemplate {
                if ( count( $validFooterLinks ) > 0 ) {
 ?>     <ul id="f-list">
 <?php
-                       foreach( $validFooterLinks as $aLink ) { ?>
+                       foreach ( $validFooterLinks as $aLink ) { ?>
                <li id="<?php echo $aLink ?>"><?php $this->html($aLink) ?></li>
 <?php
                        }
@@ -181,13 +182,20 @@ echo $footerEnd;
         * @param $sidebar array
         */
        protected function renderPortals( $sidebar ) {
-               if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
-               if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
-               if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+               if ( !isset( $sidebar['SEARCH'] ) ) {
+                       $sidebar['SEARCH'] = true;
+               }
+               if ( !isset( $sidebar['TOOLBOX'] ) ) {
+                       $sidebar['TOOLBOX'] = true;
+               }
+               if ( !isset( $sidebar['LANGUAGES'] ) ) {
+                       $sidebar['LANGUAGES'] = true;
+               }
 
-               foreach( $sidebar as $boxName => $content ) {
-                       if ( $content === false )
+               foreach ( $sidebar as $boxName => $content ) {
+                       if ( $content === false ) {
                                continue;
+                       }
 
                        if ( $boxName == 'SEARCH' ) {
                                $this->searchBox();
@@ -212,12 +220,12 @@ echo $footerEnd;
                                <?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?>
 
                                <?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
-                               if ( $wgUseTwoButtonsSearchForm ): ?>&#160;
+                               if ( $wgUseTwoButtonsSearchForm ) { ?>&#160;
                                <?php echo $this->makeSearchButton( "fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ) );
-                               else: ?>
+                               } else { ?>
 
                                <div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
-                               endif; ?>
+                               } ?>
 
                        </form>
                </div>
@@ -235,7 +243,7 @@ echo $footerEnd;
                <h3><?php $this->msg( 'views' ) ?></h3>
                <div class="pBody">
                        <ul><?php
-                               foreach( $this->data['content_actions'] as $key => $tab ) {
+                               foreach ( $this->data['content_actions'] as $key => $tab ) {
                                        echo '
                                ' . $this->makeListItem( $key, $tab );
                                } ?>
@@ -269,13 +277,13 @@ echo $footerEnd;
 
        /*************************************************************************************************/
        function languageBox() {
-               if( $this->data['language_urls'] ) {
+               if ( $this->data['language_urls'] ) {
 ?>
        <div id="p-lang" class="portlet" role="navigation">
                <h3<?php $this->html( 'userlangattributes' ) ?>><?php $this->msg( 'otherlanguages' ) ?></h3>
                <div class="pBody">
                        <ul>
-<?php          foreach( $this->data['language_urls'] as $key => $langlink ) { ?>
+<?php          foreach ( $this->data['language_urls'] as $key => $langlink ) { ?>
                                <?php echo $this->makeListItem( $key, $langlink ); ?>
 
 <?php          } ?>
@@ -304,7 +312,7 @@ echo $footerEnd;
                <div class='pBody'>
 <?php   if ( is_array( $cont ) ) { ?>
                        <ul>
-<?php                  foreach( $cont as $key => $val ) { ?>
+<?php                  foreach ( $cont as $key => $val ) { ?>
                                <?php echo $this->makeListItem( $key, $val ); ?>
 
 <?php                  } ?>
index d0f9995..f8d55c5 100644 (file)
@@ -23,7 +23,7 @@
  * @ingroup Skins
  */
 
-if( !defined( 'MEDIAWIKI' ) ) {
+if ( !defined( 'MEDIAWIKI' ) ) {
        die( -1 );
 }
 
@@ -159,11 +159,11 @@ class VectorTemplate extends BaseTemplate {
                <div id="content" class="mw-body" role="main">
                        <a id="top"></a>
                        <div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' ) ?>></div>
-                       <?php if ( $this->data['sitenotice'] ): ?>
+                       <?php if ( $this->data['sitenotice'] ) { ?>
                        <!-- sitenotice -->
                        <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
                        <!-- /sitenotice -->
-                       <?php endif; ?>
+                       <?php } ?>
                        <!-- firstHeading -->
                        <h1 id="firstHeading" class="firstHeading" lang="<?php
                                $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
@@ -172,25 +172,25 @@ class VectorTemplate extends BaseTemplate {
                        <!-- /firstHeading -->
                        <!-- bodyContent -->
                        <div id="bodyContent">
-                               <?php if ( $this->data['isarticle'] ): ?>
+                               <?php if ( $this->data['isarticle'] ) { ?>
                                <!-- tagline -->
                                <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
                                <!-- /tagline -->
-                               <?php endif; ?>
+                               <?php } ?>
                                <!-- subtitle -->
                                <div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
                                <!-- /subtitle -->
-                               <?php if ( $this->data['undelete'] ): ?>
+                               <?php if ( $this->data['undelete'] ) { ?>
                                <!-- undelete -->
                                <div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
                                <!-- /undelete -->
-                               <?php endif; ?>
-                               <?php if( $this->data['newtalk'] ): ?>
+                               <?php } ?>
+                               <?php if ( $this->data['newtalk'] ) { ?>
                                <!-- newtalk -->
                                <div class="usermessage"><?php $this->html( 'newtalk' )  ?></div>
                                <!-- /newtalk -->
-                               <?php endif; ?>
-                               <?php if ( $this->data['showjumplinks'] ): ?>
+                               <?php } ?>
+                               <?php if ( $this->data['showjumplinks'] ) { ?>
                                <!-- jumpto -->
                                <div id="jump-to-nav" class="mw-jump">
                                        <?php $this->msg( 'jumpto' ) ?>
@@ -198,27 +198,27 @@ class VectorTemplate extends BaseTemplate {
                                        <a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
                                </div>
                                <!-- /jumpto -->
-                               <?php endif; ?>
+                               <?php } ?>
                                <!-- bodycontent -->
                                <?php $this->html( 'bodycontent' ) ?>
                                <!-- /bodycontent -->
-                               <?php if ( $this->data['printfooter'] ): ?>
+                               <?php if ( $this->data['printfooter'] ) { ?>
                                <!-- printfooter -->
                                <div class="printfooter">
                                <?php $this->html( 'printfooter' ); ?>
                                </div>
                                <!-- /printfooter -->
-                               <?php endif; ?>
-                               <?php if ( $this->data['catlinks'] ): ?>
+                               <?php } ?>
+                               <?php if ( $this->data['catlinks'] ) { ?>
                                <!-- catlinks -->
                                <?php $this->html( 'catlinks' ); ?>
                                <!-- /catlinks -->
-                               <?php endif; ?>
-                               <?php if ( $this->data['dataAfterContent'] ): ?>
+                               <?php } ?>
+                               <?php if ( $this->data['dataAfterContent'] ) { ?>
                                <!-- dataAfterContent -->
                                <?php $this->html( 'dataAfterContent' ); ?>
                                <!-- /dataAfterContent -->
-                               <?php endif; ?>
+                               <?php } ?>
                                <div class="visualClear"></div>
                                <!-- debughtml -->
                                <?php $this->html( 'debughtml' ); ?>
@@ -251,26 +251,26 @@ class VectorTemplate extends BaseTemplate {
                </div>
                <!-- footer -->
                <div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
-                       <?php foreach( $this->getFooterLinks() as $category => $links ): ?>
+                       <?php foreach ( $this->getFooterLinks() as $category => $links ) { ?>
                                <ul id="footer-<?php echo $category ?>">
-                                       <?php foreach( $links as $link ): ?>
+                                       <?php foreach ( $links as $link ) { ?>
                                                <li id="footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->html( $link ) ?></li>
-                                       <?php endforeach; ?>
+                                       <?php } ?>
                                </ul>
-                       <?php endforeach; ?>
-                       <?php $footericons = $this->getFooterIcons("icononly");
-                       if ( count( $footericons ) > 0 ): ?>
+                       <?php } ?>
+                       <?php $footericons = $this->getFooterIcons( "icononly" );
+                       if ( count( $footericons ) > 0 ) { ?>
                                <ul id="footer-icons" class="noprint">
-<?php                  foreach ( $footericons as $blockName => $footerIcons ): ?>
+<?php                  foreach ( $footericons as $blockName => $footerIcons ) { ?>
                                        <li id="footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
-<?php                          foreach ( $footerIcons as $icon ): ?>
+<?php                          foreach ( $footerIcons as $icon ) { ?>
                                                <?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
 
-<?php                          endforeach; ?>
+<?php                          } ?>
                                        </li>
-<?php                  endforeach; ?>
+<?php                  } ?>
                                </ul>
-                       <?php endif; ?>
+                       <?php } ?>
                        <div style="clear:both"></div>
                </div>
                <!-- /footer -->
@@ -299,8 +299,9 @@ class VectorTemplate extends BaseTemplate {
                }
                // Render portals
                foreach ( $portals as $name => $content ) {
-                       if ( $content === false )
+                       if ( $content === false ) {
                                continue;
+                       }
 
                        echo "\n<!-- {$name} -->\n";
                        switch( $name ) {
@@ -337,24 +338,24 @@ class VectorTemplate extends BaseTemplate {
        <h3<?php $this->html( 'userlangattributes' ) ?>><?php $msgObj = wfMessage( $msg ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h3>
        <div class="body">
 <?php
-               if ( is_array( $content ) ): ?>
+               if ( is_array( $content ) ) { ?>
                <ul>
 <?php
-                       foreach( $content as $key => $val ): ?>
+                       foreach ( $content as $key => $val ) { ?>
                        <?php echo $this->makeListItem( $key, $val ); ?>
 
 <?php
-                       endforeach;
+                       }
                        if ( $hook !== null ) {
                                wfRunHooks( $hook, array( &$this, true ) );
                        }
                        ?>
                </ul>
 <?php
-               else: ?>
+               } else { ?>
                <?php echo $content; /* Allow raw HTML block to be defined by extensions */ ?>
 <?php
-               endif; ?>
+               } ?>
        </div>
 </div>
 <?php
@@ -380,35 +381,35 @@ class VectorTemplate extends BaseTemplate {
                // Render elements
                foreach ( $elements as $name => $element ) {
                        echo "\n<!-- {$name} -->\n";
-                       switch ( $element ) {
+                       switch( $element ) {
                                case 'NAMESPACES':
 ?>
-<div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
        <h3><?php $this->msg( 'namespaces' ) ?></h3>
        <ul<?php $this->html( 'userlangattributes' ) ?>>
-               <?php foreach ( $this->data['namespace_urls'] as $link ): ?>
+               <?php foreach ( $this->data['namespace_urls'] as $link ) { ?>
                        <li <?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></span></li>
-               <?php endforeach; ?>
+               <?php } ?>
        </ul>
 </div>
 <?php
                                break;
                                case 'VARIANTS':
 ?>
-<div id="p-variants" role="navigation" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-variants" role="navigation" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
        <h3 id="mw-vector-current-variant">
-       <?php foreach ( $this->data['variant_urls'] as $link ): ?>
-               <?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
+       <?php foreach ( $this->data['variant_urls'] as $link ) { ?>
+               <?php if ( stripos( $link['attributes'], 'selected' ) !== false ) { ?>
                        <?php echo htmlspecialchars( $link['text'] ) ?>
-               <?php endif; ?>
-       <?php endforeach; ?>
+               <?php } ?>
+       <?php } ?>
        </h3>
        <h3><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h3>
        <div class="menu">
                <ul>
-                       <?php foreach ( $this->data['variant_urls'] as $link ): ?>
+                       <?php foreach ( $this->data['variant_urls'] as $link ) { ?>
                                <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" lang="<?php echo htmlspecialchars( $link['lang'] ) ?>" hreflang="<?php echo htmlspecialchars( $link['hreflang'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
-                       <?php endforeach; ?>
+                       <?php } ?>
                </ul>
        </div>
 </div>
@@ -417,29 +418,29 @@ class VectorTemplate extends BaseTemplate {
                                case 'VIEWS':
 ?>
 <div id="p-views" role="navigation" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
-       <h3><?php $this->msg('views') ?></h3>
-       <ul<?php $this->html('userlangattributes') ?>>
-               <?php foreach ( $this->data['view_urls'] as $link ): ?>
+       <h3><?php $this->msg( 'views' ) ?></h3>
+       <ul<?php $this->html( 'userlangattributes' ) ?>>
+               <?php foreach ( $this->data['view_urls'] as $link ) { ?>
                        <li<?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php
                                // $link['text'] can be undefined - bug 27764
                                if ( array_key_exists( 'text', $link ) ) {
-                                       echo array_key_exists( 'img', $link ) ?  '<img src="' . $link['img'] . '" alt="' . $link['text'] . '" />' : htmlspecialchars( $link['text'] );
+                                       echo array_key_exists( 'img', $link ) ? '<img src="' . $link['img'] . '" alt="' . $link['text'] . '" />' : htmlspecialchars( $link['text'] );
                                }
                                ?></a></span></li>
-               <?php endforeach; ?>
+               <?php } ?>
        </ul>
 </div>
 <?php
                                break;
                                case 'ACTIONS':
 ?>
-<div id="p-cactions" role="navigation" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-cactions" role="navigation" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
        <h3><span><?php $this->msg( 'actions' ) ?></span><a href="#"></a></h3>
        <div class="menu">
                <ul<?php $this->html( 'userlangattributes' ) ?>>
-                       <?php foreach ( $this->data['action_urls'] as $link ): ?>
+                       <?php foreach ( $this->data['action_urls'] as $link ) { ?>
                                <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
-                       <?php endforeach; ?>
+                       <?php } ?>
                </ul>
        </div>
 </div>
@@ -447,7 +448,7 @@ class VectorTemplate extends BaseTemplate {
                                break;
                                case 'PERSONAL':
 ?>
-<div id="p-personal" role="navigation" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+<div id="p-personal" role="navigation" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
        <h3><?php $this->msg( 'personaltools' ) ?></h3>
        <ul<?php $this->html( 'userlangattributes' ) ?>>
 <?php
@@ -465,21 +466,21 @@ class VectorTemplate extends BaseTemplate {
 <div id="p-search" role="search">
        <h3<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
        <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
-               <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ): ?>
+               <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ) { ?>
                <div id="simpleSearch">
-                       <?php if ( $this->data['rtl'] ): ?>
+                       <?php if ( $this->data['rtl'] ) { ?>
                        <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-rtl.png' ), 'width' => '12', 'height' => '13' ) ); ?>
-                       <?php endif; ?>
+                       <?php } ?>
                        <?php echo $this->makeSearchInput( array( 'id' => 'searchInput', 'type' => 'text' ) ); ?>
-                       <?php if ( !$this->data['rtl'] ): ?>
+                       <?php if ( !$this->data['rtl'] ) { ?>
                        <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-ltr.png' ), 'width' => '12', 'height' => '13' ) ); ?>
-                       <?php endif; ?>
-               <?php else: ?>
+                       <?php } ?>
+               <?php } else { ?>
                <div>
                        <?php echo $this->makeSearchInput( array( 'id' => 'searchInput' ) ); ?>
                        <?php echo $this->makeSearchButton( 'go', array( 'id' => 'searchGoButton', 'class' => 'searchButton' ) ); ?>
                        <?php echo $this->makeSearchButton( 'fulltext', array( 'id' => 'mw-searchButton', 'class' => 'searchButton' ) ); ?>
-               <?php endif; ?>
+               <?php } ?>
                        <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
                </div>
        </form>