Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/59180
Change subject: Fixed spacing in skins folder ...................................................................... Fixed spacing in skins folder 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 --- M resources/Resources.php M skins/CologneBlue.php M skins/Modern.php M skins/MonoBook.php M skins/Vector.php 5 files changed, 129 insertions(+), 120 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/80/59180/1 diff --git a/resources/Resources.php b/resources/Resources.php index 7e1e3a3..c96184e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -20,7 +20,7 @@ * @file */ -if( !defined( 'MEDIAWIKI' ) ) { +if ( !defined( 'MEDIAWIKI' ) ) { die( 'Not an entry point.' ); } @@ -902,7 +902,7 @@ ), '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', diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index c5f9389..1669de7 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -22,7 +22,7 @@ * @ingroup Skins */ -if( !defined( 'MEDIAWIKI' ) ) { +if ( !defined( 'MEDIAWIKI' ) ) { die( -1 ); } @@ -533,16 +533,16 @@ $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"; diff --git a/skins/Modern.php b/skins/Modern.php index 9dbefb1..9177895 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -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 @@ */ function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $out->addModuleStyles ('skins.modern'); + $out->addModuleStyles( 'skins.modern' ); } } @@ -68,7 +69,7 @@ <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 @@ 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 @@ <!-- 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 @@ <!-- 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' ); ?> diff --git a/skins/MonoBook.php b/skins/MonoBook.php index ecbcd70..b704173 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -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 @@ $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 @@ ?><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 @@ 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 @@ $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 @@ 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 @@ * @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 @@ <?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?> <?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) ); - if ( $wgUseTwoButtonsSearchForm ): ?>  + if ( $wgUseTwoButtonsSearchForm ) { ?>  <?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 @@ <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 @@ /*************************************************************************************************/ 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 @@ <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 } ?> diff --git a/skins/Vector.php b/skins/Vector.php index d0f9995..003eed7 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -23,7 +23,7 @@ * @ingroup Skins */ -if( !defined( 'MEDIAWIKI' ) ) { +if ( !defined( 'MEDIAWIKI' ) ) { die( -1 ); } @@ -159,11 +159,11 @@ <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 @@ <!-- /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 @@ <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 @@ </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 --> @@ -337,24 +337,24 @@ <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 @@ -386,9 +386,9 @@ <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 @@ -397,18 +397,18 @@ ?> <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,16 +417,16 @@ 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 @@ -437,9 +437,9 @@ <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> @@ -465,21 +465,21 @@ <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> -- To view, visit https://gerrit.wikimedia.org/r/59180 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If934d5343ae28b1b54451754cb78358b213ea71c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits