Pass phpcs-strict on skins/
authorSiebrand Mazeland <siebrand@kitano.nl>
Wed, 23 Apr 2014 19:40:20 +0000 (21:40 +0200)
committerSiebrand Mazeland <siebrand@kitano.nl>
Wed, 23 Apr 2014 19:40:20 +0000 (21:40 +0200)
Change-Id: I2116e02445e292fdf54ac052a6b5bd82f9a79955

skins/CologneBlue.php
skins/Modern.php
skins/MonoBook.php
skins/Vector.php
skins/cologneblue/screen.css
skins/common/commonElements.css
skins/common/commonInterface.css
skins/common/config-cc.css
skins/common/feed.css
skins/common/oldshared.css

index 3b53468..bd8a677 100644 (file)
@@ -31,9 +31,10 @@ if ( !defined( 'MEDIAWIKI' ) ) {
  * @ingroup Skins
  */
 class SkinCologneBlue extends SkinTemplate {
-       var $skinname = 'cologneblue', $stylename = 'cologneblue',
-               $template = 'CologneBlueTemplate';
-       var $useHeadElement = true;
+       public $skinname = 'cologneblue';
+       public $stylename = 'cologneblue';
+       public $template = 'CologneBlueTemplate';
+       public $useHeadElement = true;
 
        /**
         * @param OutputPage $out
@@ -155,7 +156,11 @@ class CologneBlueTemplate extends BaseTemplate {
                        $navlink['text'] = wfMessage( $message )->escaped();
                }
 
-               return $this->makeListItem( $key, $this->processNavlinkForDocument( $navlink ), array( 'tag' => 'span' ) );
+               return $this->makeListItem(
+                       $key,
+                       $this->processNavlinkForDocument( $navlink ),
+                       array( 'tag' => 'span' )
+               );
        }
 
        function bottomLinks() {
@@ -170,10 +175,22 @@ class CologneBlueTemplate extends BaseTemplate {
 
                        $editLinkMessage = $this->getSkin()->getTitle()->exists() ? 'editthispage' : 'create-this-page';
                        $element[] = $this->processBottomLink( 'edit', $content_nav['views']['edit'], $editLinkMessage );
-                       $element[] = $this->processBottomLink( 'viewsource', $content_nav['views']['viewsource'], 'viewsource' );
-
-                       $element[] = $this->processBottomLink( 'watch', $content_nav['actions']['watch'], 'watchthispage' );
-                       $element[] = $this->processBottomLink( 'unwatch', $content_nav['actions']['unwatch'], 'unwatchthispage' );
+                       $element[] = $this->processBottomLink(
+                               'viewsource',
+                               $content_nav['views']['viewsource'],
+                               'viewsource'
+                       );
+
+                       $element[] = $this->processBottomLink(
+                               'watch',
+                               $content_nav['actions']['watch'],
+                               'watchthispage'
+                       );
+                       $element[] = $this->processBottomLink(
+                               'unwatch',
+                               $content_nav['actions']['unwatch'],
+                               'unwatchthispage'
+                       );
 
                        $element[] = $this->talkLink();
 
@@ -190,11 +207,27 @@ class CologneBlueTemplate extends BaseTemplate {
                        // Second row. Privileged actions.
                        $element = array();
 
-                       $element[] = $this->processBottomLink( 'delete', $content_nav['actions']['delete'], 'deletethispage' );
-                       $element[] = $this->processBottomLink( 'undelete', $content_nav['actions']['undelete'], 'undeletethispage' );
-
-                       $element[] = $this->processBottomLink( 'protect', $content_nav['actions']['protect'], 'protectthispage' );
-                       $element[] = $this->processBottomLink( 'unprotect', $content_nav['actions']['unprotect'], 'unprotectthispage' );
+                       $element[] = $this->processBottomLink(
+                               'delete',
+                               $content_nav['actions']['delete'],
+                               'deletethispage'
+                       );
+                       $element[] = $this->processBottomLink(
+                               'undelete',
+                               $content_nav['actions']['undelete'],
+                               'undeletethispage'
+                       );
+
+                       $element[] = $this->processBottomLink(
+                               'protect',
+                               $content_nav['actions']['protect'],
+                               'protectthispage'
+                       );
+                       $element[] = $this->processBottomLink(
+                               'unprotect',
+                               $content_nav['actions']['unprotect'],
+                               'unprotectthispage'
+                       );
 
                        $element[] = $this->processBottomLink( 'move', $content_nav['actions']['move'], 'movethispage' );
 
@@ -241,8 +274,9 @@ class CologneBlueTemplate extends BaseTemplate {
                        $message = $companionTitle->isTalkPage() ? 'talkpage' : 'articlepage';
                }
 
-               // Obviously this can't be reasonable and just return the key for talk namespace, only for content ones.
-               // Thus we have to mangle it in exactly the same way SkinTemplate does. (bug 40805)
+               // Obviously this can't be reasonable and just return the key for talk
+               // namespace, only for content ones. Thus we have to mangle it in
+               // exactly the same way SkinTemplate does. (bug 40805)
                $key = $companionTitle->getNamespaceKey( '' );
                if ( $companionTitle->isTalkPage() ) {
                        $key = ( $key == 'main' ? 'talk' : $key . "_talk" );
@@ -255,12 +289,13 @@ class CologneBlueTemplate extends BaseTemplate {
 
        /**
         * Takes a navigational link generated by SkinTemplate in whichever way
-        * and mangles attributes unsuitable for repeated use. In particular, this modifies the ids
-        * and removes the accesskeys. This is necessary to be able to use the same navlink twice,
-        * e.g. in sidebar and in footer.
+        * and mangles attributes unsuitable for repeated use. In particular, this
+        * modifies the ids and removes the accesskeys. This is necessary to be
+        * able to use the same navlink twice, e.g. in sidebar and in footer.
         *
         * @param array $navlink Navigational link generated by SkinTemplate
-        * @param mixed $idPrefix Prefix to add to id of this navlink. If false, id is removed entirely. Default is 'cb-'.
+        * @param mixed $idPrefix Prefix to add to id of this navlink. If false, id
+        *   is removed entirely. Default is 'cb-'.
         */
        function processNavlinkForDocument( $navlink, $idPrefix = 'cb-' ) {
                if ( $navlink['id'] ) {
@@ -296,28 +331,50 @@ class CologneBlueTemplate extends BaseTemplate {
                        <div id="langlinks"><?php echo str_replace( '<br />', '', $this->otherLanguages() ) ?></div>
                        <?php echo $this->getSkin()->getCategories() ?>
                        <div id="titlelinks"><?php echo $this->pageTitleLinks() ?></div>
-                       <?php if ( $this->data['newtalk'] ) { ?>
-                       <div class="usermessage"><strong><?php echo $this->data['newtalk'] ?></strong></div>
-                       <?php } ?>
+                       <?php
+                               if ( $this->data['newtalk'] ) {
+                       ?>
+                                       <div class="usermessage"><strong><?php echo $this->data['newtalk'] ?></strong></div>
+                       <?php
+                               }
+                       ?>
                </div>
        </div>
        <div id="article" class="mw-body" role="main">
-               <?php if ( $this->getSkin()->getSiteNotice() ) { ?>
-               <div id="siteNotice"><?php echo $this->getSkin()->getSiteNotice() ?></div>
-               <?php } ?>
+               <?php
+                       if ( $this->getSkin()->getSiteNotice() ) {
+               ?>
+                               <div id="siteNotice"><?php echo $this->getSkin()->getSiteNotice() ?></div>
+               <?php
+                       }
+               ?>
                <h1 id="firstHeading" lang="<?php
                        $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
                        $this->text( 'pageLanguage' );
                ?>"><span dir="auto"><?php echo $this->data['title'] ?></span></h1>
-               <?php if ( $this->translator->translate( 'tagline' ) ) { ?>
-               <p class="tagline"><?php echo htmlspecialchars( $this->translator->translate( 'tagline' ) ) ?></p>
-               <?php } ?>
-               <?php if ( $this->getSkin()->getOutput()->getSubtitle() ) { ?>
-               <p class="subtitle"><?php echo $this->getSkin()->getOutput()->getSubtitle() ?></p>
-               <?php } ?>
-               <?php if ( $this->getSkin()->subPageSubtitle() ) { ?>
-               <p class="subpages"><?php echo $this->getSkin()->subPageSubtitle() ?></p>
-               <?php } ?>
+               <?php
+                       if ( $this->translator->translate( 'tagline' ) ) {
+               ?>
+                               <p class="tagline"><?php
+                                       echo htmlspecialchars( $this->translator->translate( 'tagline' ) )
+                               ?></p>
+               <?php
+                       }
+               ?>
+               <?php
+                       if ( $this->getSkin()->getOutput()->getSubtitle() ) {
+               ?>
+                               <p class="subtitle"><?php echo $this->getSkin()->getOutput()->getSubtitle() ?></p>
+               <?php
+                       }
+               ?>
+               <?php
+                       if ( $this->getSkin()->subPageSubtitle() ) {
+               ?>
+                               <p class="subpages"><?php echo $this->getSkin()->subPageSubtitle() ?></p>
+               <?php
+                       }
+               ?>
 <?php
                $s = ob_get_contents();
                ob_end_clean();
@@ -414,9 +471,10 @@ class CologneBlueTemplate extends BaseTemplate {
         */
        function sidebarAdditions( $bar ) {
                // "This page" and "Edit" menus
-               // We need to do some massaging here... we reuse all of the items, except for $...['views']['view'],
-               // as $...['namespaces']['main'] and $...['namespaces']['talk'] together serve the same purpose.
-               // We also don't use $...['variants'], these are displayed in the top menu.
+               // We need to do some massaging here... we reuse all of the items,
+               // except for $...['views']['view'], as $...['namespaces']['main'] and
+               // $...['namespaces']['talk'] together serve the same purpose. We also
+               // don't use $...['variants'], these are displayed in the top menu.
                $content_navigation = $this->data['content_navigation'];
                $qbpageoptions = array_merge(
                        $content_navigation['namespaces'],
@@ -513,7 +571,11 @@ class CologneBlueTemplate extends BaseTemplate {
                foreach ( $bar as $heading => $data ) {
                        $portletId = Sanitizer::escapeId( "p-$heading" );
                        $headingMsg = wfMessage( $idToMessage[$heading] ? $idToMessage[$heading] : $heading );
-                       $headingHTML = "<h3>" . ( $headingMsg->exists() ? $headingMsg->escaped() : htmlspecialchars( $heading ) ) . "</h3>";
+                       $headingHTML = "<h3>";
+                       $headingHTML .= $headingMsg->exists()
+                               ? $headingMsg->escaped()
+                               : htmlspecialchars( $heading );
+                       $headingHTML .= "</h3>";
                        $listHTML = "";
 
                        if ( is_array( $data ) ) {
@@ -534,7 +596,8 @@ class CologneBlueTemplate extends BaseTemplate {
 
                        if ( $listHTML ) {
                                $role = ( $heading == 'search' ) ? 'search' : 'navigation';
-                               $s .= "<div class=\"portlet\" id=\"$portletId\" role=\"$role\">\n$headingHTML\n$listHTML\n</div>\n";
+                               $s .= "<div class=\"portlet\" id=\"$portletId\" "
+                                       . "role=\"$role\">\n$headingHTML\n$listHTML\n</div>\n";
                        }
 
                        $s .= $this->renderAfterPortlet( $heading );
@@ -553,19 +616,25 @@ 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\">";
+               $s = "<form id=\"searchform-" . htmlspecialchars( $which )
+                       . "\" method=\"get\" class=\"inline\" action=\"$action\">";
                if ( $which == 'footer' ) {
                        $s .= wfMessage( 'qbfind' )->text() . ": ";
                }
 
-               $s .= $this->makeSearchInput( array( 'class' => 'mw-searchInput', 'type' => 'text', 'size' => '14' ) );
+               $s .= $this->makeSearchInput( array(
+                       'class' => 'mw-searchInput',
+                       'type' => 'text',
+                       'size' => '14'
+               ) );
                $s .= ( $which == 'footer' ? " " : "<br />" );
                $s .= $this->makeSearchButton( 'go', array( 'class' => 'searchButton' ) );
 
                if ( $wgUseTwoButtonsSearchForm ) {
                        $s .= $this->makeSearchButton( 'fulltext', array( 'class' => 'searchButton' ) );
                } else {
-                       $s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n";
+                       $s .= '<div><a href="' . $action . '" rel="search">'
+                               . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n";
                }
 
                $s .= '</form>';
index 81c0f51..28e918e 100644 (file)
@@ -32,8 +32,10 @@ if ( !defined( 'MEDIAWIKI' ) ) {
  * @ingroup Skins
  */
 class SkinModern extends SkinTemplate {
-       var $skinname = 'modern', $stylename = 'modern',
-               $template = 'ModernTemplate', $useHeadElement = true;
+       public $skinname = 'modern';
+       public $stylename = 'modern';
+       public $template = 'ModernTemplate';
+       public $useHeadElement = true;
 
        /**
         * @param OutputPage $out
@@ -85,22 +87,45 @@ class ModernTemplate extends MonoBookTemplate {
                <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>
-                       <?php } ?>
-                       <?php if ( $this->data['sitenotice'] ) {
+                       <?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 } ?>
+                       <?php
+                       }
+                       ?>
                </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 } ?>
-               <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>
+               <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
+                       }
+               ?>
+               <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 $this->html( 'bodytext' ) ?>
                <div class='mw_clear'></div>
-               <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
+               <?php
+                       if ( $this->data['catlinks'] ) {
+                               $this->html( 'catlinks' );
+                       }
+               ?>
                <?php $this->html( 'dataAfterContent' ) ?>
        </div><!-- mw_contentholder -->
        </div><!-- mw_content -->
@@ -124,10 +149,13 @@ class ModernTemplate extends MonoBookTemplate {
                <h3><?php $this->msg( 'personaltools' ) ?></h3>
                <div class="pBody">
                        <ul>
-<?php          foreach ( $this->getPersonalTools() as $key => $item ) { ?>
+<?php
+foreach ( $this->getPersonalTools() as $key => $item ) { ?>
                                <?php echo $this->makeListItem( $key, $item ); ?>
 
-<?php          } ?>
+<?php
+}
+?>
                        </ul>
                </div>
        </div>
@@ -140,7 +168,8 @@ class ModernTemplate extends MonoBookTemplate {
                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          }
+<?php
+                       }
                }
 ?>
                        </ul>
index fe6a25f..a64e9d0 100644 (file)
@@ -36,8 +36,10 @@ if ( !defined( 'MEDIAWIKI' ) ) {
  */
 class SkinMonoBook extends SkinTemplate {
        /** Using monobook. */
-       var $skinname = 'monobook', $stylename = 'monobook',
-               $template = 'MonoBookTemplate', $useHeadElement = true;
+       public $skinname = 'monobook';
+       public $stylename = 'monobook';
+       public $template = 'MonoBookTemplate';
+       public $useHeadElement = true;
 
        /**
         * @param OutputPage $out
@@ -76,7 +78,13 @@ 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()->getHtmlCode();
@@ -84,19 +92,44 @@ class MonoBookTemplate extends BaseTemplate {
        ?>"><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>
+               <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'] ) { ?>
+<?php
+}
+?><?php
+               if ( $this->data['newtalk'] ) {
+                       ?>
                <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
-<?php } ?>
-               <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
+               }
+               ?>
+               <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>
 
                <!-- start content -->
 <?php $this->html( 'bodytext' ) ?>
-               <?php if ( $this->data['catlinks'] ) { $this->html( 'catlinks' ); } ?>
+               <?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>
@@ -110,7 +143,9 @@ class MonoBookTemplate extends BaseTemplate {
 <?php          foreach ( $this->getPersonalTools() as $key => $item ) { ?>
                                <?php echo $this->makeListItem( $key, $item ); ?>
 
-<?php          } ?>
+<?php
+}
+?>
                        </ul>
                </div>
        </div>
@@ -138,15 +173,18 @@ class MonoBookTemplate extends BaseTemplate {
        } else {
                $footerEnd = '';
        }
+
        foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?>
        <div id="f-<?php echo htmlspecialchars( $blockName ); ?>ico">
 <?php foreach ( $footerIcons as $icon ) { ?>
                <?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
 
-<?php }
+<?php
+}
 ?>
        </div>
-<?php }
+<?php
+       }
 
                if ( count( $validFooterLinks ) > 0 ) {
 ?>     <ul id="f-list">
@@ -157,8 +195,10 @@ class MonoBookTemplate extends BaseTemplate {
                        }
 ?>
        </ul>
-<?php  }
-echo $footerEnd;
+<?php
+               }
+
+               echo $footerEnd;
 ?>
 
 </div>
@@ -212,12 +252,22 @@ echo $footerEnd;
                                <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
                                <?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?>
 
-                               <?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
+                               <?php
+                               echo $this->makeSearchButton(
+                                       "go",
+                                       array( "id" => "searchGoButton", "class" => "searchButton" )
+                               );
+
                                if ( $wgUseTwoButtonsSearchForm ) { ?>&#160;
-                               <?php echo $this->makeSearchButton( "fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ) );
+                               <?php echo $this->makeSearchButton(
+                                               "fulltext",
+                                               array( "id" => "mw-searchButton", "class" => "searchButton" )
+                                       );
                                } else { ?>
 
-                               <div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
+                               <div><a href="<?php
+                                       $this->text( 'searchaction' )
+                               ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
                                } ?>
 
                        </form>
@@ -283,7 +333,9 @@ echo $footerEnd;
 <?php          foreach ( $this->data['language_urls'] as $key => $langlink ) { ?>
                                <?php echo $this->makeListItem( $key, $langlink ); ?>
 
-<?php          } ?>
+<?php
+}
+?>
                        </ul>
 
 <?php          $this->renderAfterPortlet( 'lang' ); ?>
@@ -299,7 +351,12 @@ echo $footerEnd;
         * @param array|string $cont
         */
        function customBox( $bar, $cont ) {
-               $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ), 'role' => 'navigation' );
+               $portletAttribs = array(
+                       'class' => 'generated-sidebar portlet',
+                       'id' => Sanitizer::escapeId( "p-$bar" ),
+                       'role' => 'navigation'
+               );
+
                $tooltip = Linker::titleAttrib( "p-$bar" );
                if ( $tooltip !== false ) {
                        $portletAttribs['title'] = $tooltip;
@@ -310,17 +367,24 @@ echo $footerEnd;
 
                <h3><?php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $bar ); ?></h3>
                <div class='pBody'>
-<?php   if ( is_array( $cont ) ) { ?>
+<?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                  } ?>
+<?php
+}
+?>
                        </ul>
-<?php   } else {
+<?php
+} else {
                        # allow raw HTML block to be defined by extensions
                        print $cont;
-               }
+}
 
                $this->renderAfterPortlet( $bar );
 ?>
index 8ede82a..e412c9c 100644 (file)
@@ -32,12 +32,13 @@ if ( !defined( 'MEDIAWIKI' ) ) {
  * @ingroup Skins
  */
 class SkinVector extends SkinTemplate {
+       public $useHeadElement = true;
+       public $skinname = 'vector';
+       public $stylename = 'vector';
+       public $template = 'VectorTemplate';
 
        protected static $bodyClasses = array( 'vector-animateLayout' );
 
-       var $skinname = 'vector', $stylename = 'vector',
-               $template = 'VectorTemplate', $useHeadElement = true;
-
        /**
         * Initializes output page and sets up skin-specific parameters
         * @param OutputPage $out Object to initialize
@@ -92,7 +93,6 @@ class SkinVector extends SkinTemplate {
  * @ingroup Skins
  */
 class VectorTemplate extends BaseTemplate {
-
        /* Functions */
 
        /**
@@ -105,7 +105,10 @@ class VectorTemplate extends BaseTemplate {
                $nav = $this->data['content_navigation'];
 
                if ( $wgVectorUseIconWatch ) {
-                       $mode = $this->getSkin()->getUser()->isWatched( $this->getSkin()->getRelevantTitle() ) ? 'unwatch' : 'watch';
+                       $mode = $this->getSkin()->getUser()->isWatched( $this->getSkin()->getRelevantTitle() )
+                               ? 'unwatch'
+                               : 'watch';
+
                        if ( isset( $nav['actions'][$mode] ) ) {
                                $nav['views'][$mode] = $nav['actions'][$mode];
                                $nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' );
@@ -160,42 +163,81 @@ 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'] ) {
+       ?>
                        <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
-                       <?php } ?>
+                       <?php
+}
+                       ?>
                        <h1 id="firstHeading" class="firstHeading" lang="<?php
-                               $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+                               $this->data['pageLanguage'] =
+                                       $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
                                $this->text( 'pageLanguage' );
                        ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
                        <?php $this->html( 'prebodyhtml' ) ?>
                        <div id="bodyContent">
-                               <?php if ( $this->data['isarticle'] ) { ?>
+                               <?php
+if ( $this->data['isarticle'] ) {
+       ?>
                                <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
-                               <?php } ?>
-                               <div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
-                               <?php if ( $this->data['undelete'] ) { ?>
+                               <?php
+}
+                               ?>
+                               <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'] ) { ?>
+                               <?php
+}
+                               ?>
+                               <?php
+if ( $this->data['newtalk'] ) {
+       ?>
                                <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
-                               <?php } ?>
+                               <?php
+}
+                               ?>
                                <div id="jump-to-nav" class="mw-jump">
                                        <?php $this->msg( 'jumpto' ) ?>
-                                       <a href="#mw-navigation"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?>
+                                       <a href="#mw-navigation"><?php
+                                               $this->msg( 'jumptonavigation' )
+                                       ?></a><?php
+                                               $this->msg( 'comma-separator' )
+                                       ?>
                                        <a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
                                </div>
                                <?php $this->html( 'bodycontent' ) ?>
-                               <?php if ( $this->data['printfooter'] ) { ?>
+                               <?php
+if ( $this->data['printfooter'] ) {
+       ?>
                                <div class="printfooter">
                                <?php $this->html( 'printfooter' ); ?>
                                </div>
-                               <?php } ?>
-                               <?php if ( $this->data['catlinks'] ) { ?>
-                               <?php $this->html( 'catlinks' ); ?>
-                               <?php } ?>
-                               <?php if ( $this->data['dataAfterContent'] ) { ?>
-                               <?php $this->html( 'dataAfterContent' ); ?>
-                               <?php } ?>
+                               <?php
+}
+                               ?>
+                               <?php
+if ( $this->data['catlinks'] ) {
+       ?>
+                               <?php
+       $this->html( 'catlinks' );
+       ?>
+                               <?php
+}
+                               ?>
+                               <?php
+if ( $this->data['dataAfterContent'] ) {
+       ?>
+                               <?php
+       $this->html( 'dataAfterContent' );
+       ?>
+                               <?php
+}
+                               ?>
                                <div class="visualClear"></div>
                                <?php $this->html( 'debughtml' ); ?>
                        </div>
@@ -212,31 +254,66 @@ class VectorTemplate extends BaseTemplate {
                                </div>
                        </div>
                        <div id="mw-panel">
-                                       <div id="p-logo" role="banner"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>></a></div>
+                                       <div id="p-logo" role="banner"><a style="background-image: url(<?php
+                                               $this->text( 'logopath' )
+                                               ?>);" href="<?php
+                                               echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] )
+                                       ?>" <?php
+                                               echo Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) )
+                                       ?>></a></div>
                                <?php $this->renderPortals( $this->data['sidebar'] ); ?>
                        </div>
                </div>
                <div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
-                       <?php foreach ( $this->getFooterLinks() as $category => $links ) { ?>
-                               <ul id="footer-<?php echo $category ?>">
-                                       <?php foreach ( $links as $link ) { ?>
-                                               <li id="footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->html( $link ) ?></li>
-                                       <?php } ?>
+                       <?php
+foreach ( $this->getFooterLinks() as $category => $links ) {
+       ?>
+                               <ul id="footer-<?php
+       echo $category
+                               ?>">
+                                       <?php
+       foreach ( $links as $link ) {
+               ?>
+                                               <li id="footer-<?php
+               echo $category
+                                               ?>-<?php
+               echo $link
+                                               ?>"><?php
+               $this->html( $link )
+                                               ?></li>
+                                       <?php
+       }
+                                       ?>
                                </ul>
-                       <?php } ?>
+                       <?php
+}
+                       ?>
                        <?php $footericons = $this->getFooterIcons( "icononly" );
                        if ( count( $footericons ) > 0 ) { ?>
                                <ul id="footer-icons" class="noprint">
-<?php                  foreach ( $footericons as $blockName => $footerIcons ) { ?>
-                                       <li id="footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
-<?php                          foreach ( $footerIcons as $icon ) { ?>
-                                               <?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
+       <?php
+foreach ( $footericons as $blockName => $footerIcons ) {
+       ?>
+                                       <li id="footer-<?php
+       echo htmlspecialchars( $blockName ); ?>ico">
+<?php
+       foreach ( $footerIcons as $icon ) {
+               ?>
+                                               <?php
+               echo $this->getSkin()->makeFooterIcon( $icon );
+               ?>
 
-<?php                          } ?>
+<?php
+       }
+?>
                                        </li>
-<?php                  } ?>
+<?php
+}
+?>
                                </ul>
-                       <?php } ?>
+                       <?php
+                       }
+                       ?>
                        <div style="clear:both"></div>
                </div>
                <?php $this->printTrail(); ?>
@@ -298,8 +375,18 @@ class VectorTemplate extends BaseTemplate {
                }
                $msgObj = wfMessage( $msg );
                ?>
-<div class="portal" role="navigation" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?> aria-labelledby='<?php echo Sanitizer::escapeId( "p-$name-label" ) ?>'>
-       <h3<?php $this->html( 'userlangattributes' ) ?> id='<?php echo Sanitizer::escapeId( "p-$name-label" ) ?>'><?php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h3>
+<div class="portal" role="navigation" id='<?php
+       echo Sanitizer::escapeId( "p-$name" )
+?>'<?php
+       echo Linker::tooltip( 'p-' . $name )
+?> aria-labelledby='<?php echo Sanitizer::escapeId( "p-$name-label" ) ?>'>
+       <h3<?php
+               $this->html( 'userlangattributes' )
+       ?> id='<?php
+               echo Sanitizer::escapeId( "p-$name-label" )
+       ?>'><?php
+               echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg );
+       ?></h3>
        <div class="body">
 <?php
                if ( is_array( $content ) ) { ?>
@@ -350,32 +437,77 @@ class VectorTemplate extends BaseTemplate {
                        switch ( $element ) {
                                case 'NAMESPACES':
 ?>
-<div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-namespaces-label">
+<div id="p-namespaces" role="navigation" class="vectorTabs<?php
+if ( count( $this->data['namespace_urls'] ) == 0 ) {
+       echo ' emptyPortlet';
+}
+?>" aria-labelledby="p-namespaces-label">
        <h3 id="p-namespaces-label"><?php $this->msg( 'namespaces' ) ?></h3>
        <ul<?php $this->html( 'userlangattributes' ) ?>>
-               <?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 } ?>
+               <?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
+}
+               ?>
        </ul>
 </div>
 <?php
                                break;
                                case 'VARIANTS':
 ?>
-<div id="p-variants" role="navigation" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-variants-label">
+<div id="p-variants" role="navigation" class="vectorMenu<?php
+if ( count( $this->data['variant_urls'] ) == 0 ) {
+       echo ' emptyPortlet';
+}
+?>" aria-labelledby="p-variants-label">
        <h3 id="mw-vector-current-variant">
-       <?php foreach ( $this->data['variant_urls'] as $link ) { ?>
-               <?php if ( stripos( $link['attributes'], 'selected' ) !== false ) { ?>
-                       <?php echo htmlspecialchars( $link['text'] ) ?>
-               <?php } ?>
-       <?php } ?>
+       <?php
+foreach ( $this->data['variant_urls'] as $link ) { ?>
+               <?php
+       if ( stripos( $link['attributes'], 'selected' ) !== false ) {
+                       ?>
+                       <?php
+               echo htmlspecialchars( $link['text'] )
+                       ?>
+               <?php
+       }
+               ?>
+       <?php
+}
+       ?>
        </h3>
        <h3 id="p-variants-label"><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h3>
        <div class="menu">
                <ul>
-                       <?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 } ?>
+                       <?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
+}
+                       ?>
                </ul>
        </div>
 </div>
@@ -383,30 +515,63 @@ class VectorTemplate extends BaseTemplate {
                                break;
                                case 'VIEWS':
 ?>
-<div id="p-views" role="navigation" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-views-label">
+<div id="p-views" role="navigation" class="vectorTabs<?php
+if ( count( $this->data['view_urls'] ) == 0 ) {
+       echo ' emptyPortlet';
+}
+?>" aria-labelledby="p-views-label">
        <h3 id="p-views-label"><?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'] );
-                               }
+       <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'] );
+               }
                                ?></a></span></li>
-               <?php } ?>
+               <?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'; } ?>" aria-labelledby="p-cactions-label">
+<div id="p-cactions" role="navigation" class="vectorMenu<?php
+if ( count( $this->data['action_urls'] ) == 0 ) {
+       echo ' emptyPortlet';
+}
+?>" aria-labelledby="p-cactions-label">
        <h3 id="p-cactions-label"><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 ) { ?>
-                               <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
-                       <?php } ?>
+                       <?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
+}
+                       ?>
                </ul>
        </div>
 </div>
@@ -414,7 +579,11 @@ class VectorTemplate extends BaseTemplate {
                                break;
                                case 'PERSONAL':
 ?>
-<div id="p-personal" role="navigation" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-personal-label">
+<div id="p-personal" role="navigation" class="<?php
+               if ( count( $this->data['personal_urls'] ) == 0 ) {
+                       echo ' emptyPortlet';
+               }
+       ?>" aria-labelledby="p-personal-label">
        <h3 id="p-personal-label"><?php $this->msg( 'personaltools' ) ?></h3>
        <ul<?php $this->html( 'userlangattributes' ) ?>>
 <?php
@@ -430,13 +599,21 @@ class VectorTemplate extends BaseTemplate {
                                case 'SEARCH':
 ?>
 <div id="p-search" role="search">
-       <h3<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
+       <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 ) { ?>
+               <?php
+if ( $wgVectorUseSimpleSearch ) {
+               ?>
                        <div id="simpleSearch">
-               <?php } else { ?>
+               <?php
+} else {
+               ?>
                        <div>
-               <?php } ?>
+               <?php
+}
+               ?>
                        <?php
                        echo $this->makeSearchInput( array( 'id' => 'searchInput' ) );
                        echo Html::hidden( 'title', $this->get( 'searchtitle' ) );
@@ -448,7 +625,10 @@ class VectorTemplate extends BaseTemplate {
                        // * The mediawiki.searchSuggest module, after doing tests for the broken browsers, removes
                        //   the 'fulltext' button and handles 'fulltext' search itself; this will reveal the 'go'
                        //   button and cause it to be used.
-                       echo $this->makeSearchButton( 'fulltext', array( 'id' => 'mw-searchButton', 'class' => 'searchButton mw-fallbackSearchButton' ) );
+                       echo $this->makeSearchButton(
+                               'fulltext',
+                               array( 'id' => 'mw-searchButton', 'class' => 'searchButton mw-fallbackSearchButton' )
+                       );
                        echo $this->makeSearchButton( 'go', array( 'id' => 'searchButton', 'class' => 'searchButton' ) );
                        ?>
                </div>
index ef9cf8f..a5fff31 100644 (file)
@@ -227,7 +227,7 @@ input.mw-searchInput {
 /* Bring #sitetitle to top. Otherwise #toplinks is overlaid over it, making the link unclickable. */
 #sitetitle a {
        position: relative;
-       z-index: 10
+       z-index: 10;
 }
 
 #toplinks {
index ad7942a..8a26c31 100644 (file)
@@ -232,4 +232,3 @@ select {
 table.small {
        font-size: 100%;
 }
-
index 7eca070..733fd11 100644 (file)
@@ -32,6 +32,7 @@
        text-align: center;
        margin: 0;
 }
+
 #localNotice {
        margin-bottom: 0.9em;
 }
 #siteSub {
        display: none;
 }
+
 #jump-to-nav {
        /* Negate #contentSub's margin and replicate it so that the jump to links don't affect the spacing */
        margin-top: -1.4em;
-       margin-bottom: 1.4em
+       margin-bottom: 1.4em;
 }
+
 #contentSub, #contentSub2 {
        font-size: 84%;
        line-height: 1.2em;
@@ -62,7 +65,7 @@
        color: #545454;
        width: auto;
 }
+
 span.subpages {
        display: block;
 }
-
index d81218e..ecd10fa 100644 (file)
@@ -54,4 +54,3 @@ td, h3, p, h1, pre {
 .dent {
        margin-left: 64px;
 }
-
index 9439663..622d2ae 100644 (file)
@@ -63,24 +63,24 @@ item>description, entry>summary {
        background: #f8f8ff;
 }
 
-pubDate:before { content: "Date: " }
-link:before { content: "Link: " }
-author:before, creator:before { content: "Author: " }
-description:before { content: "Description: " }
-id:before { content: "Id: " }
+pubDate:before { content: "Date: "; }
+link:before { content: "Link: "; }
+author:before, creator:before { content: "Author: "; }
+description:before { content: "Description: "; }
+id:before { content: "Id: "; }
 
-generator:before { content: "Generator: " }
-language:before { content: "Language: " }
-lastBuildDate:before { content: "Updated: " }
-comments:before { content: "Comments page: " }
+generator:before { content: "Generator: "; }
+language:before { content: "Language: "; }
+lastBuildDate:before { content: "Updated: "; }
+comments:before { content: "Comments page: "; }
 
-tagline:before { content: "Tagline: " }
-issued:before { content: "Issued: " }
-created:before { content: "Created: " }
-modified:before { content: "Modified: " }
-updated:before { content: "Updated: " }
-summary:before { content: "Summary: " }
-comment:before { content: "Comment: " }
+tagline:before { content: "Tagline: "; }
+issued:before { content: "Issued: "; }
+created:before { content: "Created: "; }
+modified:before { content: "Modified: "; }
+updated:before { content: "Updated: "; }
+summary:before { content: "Summary: "; }
+comment:before { content: "Comment: "; }
 
 pubDate:before, link:before, author:before, description:before,
 language:before, generator:before, lastBuildDate:before, comments:before,
index eea8b8e..2df9e81 100644 (file)
@@ -20,7 +20,7 @@ h1, h2, h3, h4, h5, h6 {
 
 /* Now the custom parts */
 
-#footer { clear: both }
+#footer { clear: both; }
 /* images */
 /* @noflip */
 div.floatright {