Localisation updates for core and extension messages from translatewiki.net (2010...
[lhc/web/wiklou.git] / skins / Vector.php
index 9f888d6..96db057 100644 (file)
@@ -8,8 +8,9 @@
  * @ingroup Skins
  */
 
-if( !defined( 'MEDIAWIKI' ) )
+if( !defined( 'MEDIAWIKI' ) ) {
        die( -1 );
+}
 
 /**
  * SkinTemplate class for Vector skin
@@ -23,24 +24,37 @@ class SkinVector extends SkinTemplate {
 
        /**
         * Initializes output page and sets up skin-specific parameters
-        * @param object $out Output page object to initialize
+        * @param $out OutputPage object to initialize
         */
        public function initPage( OutputPage $out ) {
-               global $wgStylePath, $wgJsMimeType, $wgStyleVersion, $wgScriptPath, $wgVectorExtraStyles;
-               
+               global $wgLocalStylePath;
+
                parent::initPage( $out );
 
-               // Append skin-specific styles
-               $out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );
-               $out->addStyle( 'vector/main-ltr.css', 'screen', '', 'ltr' );
                // Append CSS which includes IE only behavior fixes for hover support -
                // this is better than including this in a CSS fille since it doesn't
                // wait for the CSS file to load before fetching the HTC file.
                $out->addScript(
                        '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
-                               $wgStylePath .
+                               htmlspecialchars( $wgLocalStylePath ) .
                                '/vector/csshover.htc")}</style><![endif]-->'
                );
+       }
+
+       /**
+        * Load skin and user CSS files in the correct order
+        * fixes bug 22916
+        * @param $out OutputPage object
+        */
+       function setupSkinUserCss( OutputPage $out ){
+               global $wgVectorExtraStyles;
+
+               parent::setupSkinUserCss( $out );
+
+               // Append skin-specific styles
+               $out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );
+               $out->addStyle( 'vector/main-ltr.css', 'screen', '', 'ltr' );
+
                // Add extra stylesheets
                // THIS IS ONLY USEFUL FOR EXPERIMENTING WITH DIFFERNT STYLE OPTIONS! THIS WILL BE REMOVED IN THE NEAR FUTURE.
                if ( is_array( $wgVectorExtraStyles ) ) {
@@ -49,13 +63,14 @@ class SkinVector extends SkinTemplate {
                        }
                }
        }
+
        /**
         * Builds a structured array of links used for tabs and menus
         * @return array
         * @private
         */
        function buildNavigationUrls() {
-               global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle, $wgStylePath;
+               global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle;
                global $wgDisableLangConversion, $wgVectorUseIconWatch;
 
                wfProfileIn( __METHOD__ );
@@ -73,7 +88,6 @@ class SkinVector extends SkinTemplate {
 
                // Checks if page is some kind of content
                if( $this->iscontent ) {
-
                        // Gets page objects for the related namespaces
                        $subjectPage = $this->mTitle->getSubjectPage();
                        $talkPage = $this->mTitle->getTalkPage();
@@ -136,7 +150,7 @@ class SkinVector extends SkinTemplate {
                                                ? wfMsg( 'vector-view-edit' )
                                                : wfMsg( 'vector-view-create' ),
                                        'href' =>
-                                               $this->mTitle->getLocalUrl( $this->editUrlOptions() )
+                                               $this->mTitle->getLocalURL( $this->editUrlOptions() )
                                );
                                // Checks if this is a current rev of talk page and we should show a new
                                // section link
@@ -148,20 +162,20 @@ class SkinVector extends SkinTemplate {
                                                $links['views']['addsection'] = array(
                                                        'class' => 'collapsible ' . ( $section == 'new' ? 'selected' : false ),
                                                        'text' => wfMsg( 'vector-action-addsection' ),
-                                                       'href' => $this->mTitle->getLocalUrl(
+                                                       'href' => $this->mTitle->getLocalURL(
                                                                'action=edit&section=new'
                                                        )
                                                );
                                        }
                                }
-                       // Checks if the page is known (some kind of viewable content)
-                       } elseif ( $this->mTitle->isKnown() ) {
+                       // Checks if the page has some kind of viewable content
+                       } elseif ( $this->mTitle->hasSourceText() ) {
                                // Adds view source view link
                                $links['views']['viewsource'] = array(
                                        'class' => ( $action == 'edit' ) ? 'selected' : false,
                                        'text' => wfMsg( 'vector-view-viewsource' ),
                                        'href' =>
-                                               $this->mTitle->getLocalUrl( $this->editUrlOptions() )
+                                               $this->mTitle->getLocalURL( $this->editUrlOptions() )
                                );
                        }
                        wfProfileOut( __METHOD__ . '-edit' );
@@ -172,17 +186,17 @@ class SkinVector extends SkinTemplate {
                        if ( $this->mTitle->exists() ) {
                                // Adds history view link
                                $links['views']['history'] = array(
-                                       'class' => 'collapsible ' . ( ($action == 'history') ? 'selected' : false ),
+                                       'class' => 'collapsible ' . ( ( $action == 'history' ) ? 'selected' : false ),
                                        'text' => wfMsg( 'vector-view-history' ),
-                                       'href' => $this->mTitle->getLocalUrl( 'action=history' ),
+                                       'href' => $this->mTitle->getLocalURL( 'action=history' ),
                                        'rel' => 'archives',
                                );
 
                                if( $wgUser->isAllowed( 'delete' ) ) {
                                        $links['actions']['delete'] = array(
-                                               'class' => ($action == 'delete') ? 'selected' : false,
+                                               'class' => ( $action == 'delete' ) ? 'selected' : false,
                                                'text' => wfMsg( 'vector-action-delete' ),
-                                               'href' => $this->mTitle->getLocalUrl( 'action=delete' )
+                                               'href' => $this->mTitle->getLocalURL( 'action=delete' )
                                        );
                                }
                                if ( $this->mTitle->quickUserCan( 'move' ) ) {
@@ -193,7 +207,7 @@ class SkinVector extends SkinTemplate {
                                                'class' => $this->mTitle->isSpecial( 'Movepage' ) ?
                                                                                'selected' : false,
                                                'text' => wfMsg( 'vector-action-move' ),
-                                               'href' => $moveTitle->getLocalUrl()
+                                               'href' => $moveTitle->getLocalURL()
                                        );
                                }
 
@@ -201,22 +215,22 @@ class SkinVector extends SkinTemplate {
                                        $this->mTitle->getNamespace() !== NS_MEDIAWIKI &&
                                        $wgUser->isAllowed( 'protect' )
                                ) {
-                                       if ( !$this->mTitle->isProtected() ){
+                                       if ( !$this->mTitle->isProtected() ) {
                                                $links['actions']['protect'] = array(
-                                                       'class' => ($action == 'protect') ?
+                                                       'class' => ( $action == 'protect' ) ?
                                                                                        'selected' : false,
                                                        'text' => wfMsg( 'vector-action-protect' ),
                                                        'href' =>
-                                                               $this->mTitle->getLocalUrl( 'action=protect' )
+                                                               $this->mTitle->getLocalURL( 'action=protect' )
                                                );
 
                                        } else {
                                                $links['actions']['unprotect'] = array(
-                                                       'class' => ($action == 'unprotect') ?
+                                                       'class' => ( $action == 'unprotect' ) ?
                                                                                        'selected' : false,
                                                        'text' => wfMsg( 'vector-action-unprotect' ),
                                                        'href' =>
-                                                               $this->mTitle->getLocalUrl( 'action=unprotect' )
+                                                               $this->mTitle->getLocalURL( 'action=unprotect' )
                                                );
                                        }
                                }
@@ -235,7 +249,7 @@ class SkinVector extends SkinTemplate {
                                                                array( 'parsemag' ),
                                                                $wgLang->formatNum( $n )
                                                        ),
-                                                       'href' => $undelTitle->getLocalUrl(
+                                                       'href' => $undelTitle->getLocalURL(
                                                                'target=' . urlencode( $this->thispage )
                                                        )
                                                );
@@ -248,20 +262,20 @@ class SkinVector extends SkinTemplate {
                                ) {
                                        if ( !$this->mTitle->getRestrictions( 'create' ) ) {
                                                $links['actions']['protect'] = array(
-                                                       'class' => ($action == 'protect') ?
+                                                       'class' => ( $action == 'protect' ) ?
                                                                                        'selected' : false,
                                                        'text' => wfMsg( 'vector-action-protect' ),
                                                        'href' =>
-                                                               $this->mTitle->getLocalUrl( 'action=protect' )
+                                                               $this->mTitle->getLocalURL( 'action=protect' )
                                                );
 
                                        } else {
                                                $links['actions']['unprotect'] = array(
-                                                       'class' => ($action == 'unprotect') ?
+                                                       'class' => ( $action == 'unprotect' ) ?
                                                                                        'selected' : false,
                                                        'text' => wfMsg( 'vector-action-unprotect' ),
                                                        'href' =>
-                                                               $this->mTitle->getLocalUrl( 'action=unprotect' )
+                                                               $this->mTitle->getLocalURL( 'action=unprotect' )
                                                );
                                        }
                                }
@@ -289,7 +303,7 @@ class SkinVector extends SkinTemplate {
                                $links[$place][$mode] = array(
                                        'class' => $class . ( ( $action == 'watch' || $action == 'unwatch' ) ? ' selected' : false ),
                                        'text' => wfMsg( $mode ), // uses 'watch' or 'unwatch' message
-                                       'href' => $this->mTitle->getLocalUrl( 'action=' . $mode )
+                                       'href' => $this->mTitle->getLocalURL( 'action=' . $mode )
                                );
                        }
                        // This is instead of SkinTemplateTabs - which uses a flat array
@@ -425,7 +439,15 @@ class VectorTemplate extends QuickTemplate {
                                'about',
                                'disclaimer',
                        ),
+                       'icons' => array(
+                               'poweredbyico',
+                               'copyrightico',
+                       ),
                );
+               $footerlinksClasses = array(
+                       'icons' => array( 'noprint' )
+               );
+               
                // Reduce footer links down to only those which are being used
                $validFooterLinks = array();
                foreach( $footerlinks as $category => $links ) {
@@ -448,13 +470,12 @@ class VectorTemplate extends QuickTemplate {
                // Output HTML Page
                $this->html( 'headelement' );
 ?>
-       <body<?php if ( $this->data['body_ondblclick'] ): ?> ondblclick="<?php $this->text( 'body_ondblclick' ) ?>"<?php endif; ?> <?php if ( $this->data['body_onload'] ): ?> onload="<?php $this->text( 'body_onload' ) ?>"<?php endif; ?> class="mediawiki <?php $this->text( 'dir' ) ?> <?php $this->text( 'pageclass' ) ?> <?php $this->text( 'skinnameclass' ) ?>" dir="<?php $this->text( 'dir' ) ?>">
-               <div id="page-base" class="noprint"></div>
-               <div id="head-base" class="noprint"></div>
+               <div id="mw-page-base" class="noprint"></div>
+               <div id="mw-head-base" class="noprint"></div>
                <!-- content -->
-               <div id="content" <?php $this->html('specialpageattributes') ?>>
+               <div id="content"<?php $this->html('specialpageattributes') ?>>
                        <a id="top"></a>
-                       <div id="mw-js-message" style="display:none;" <?php $this->html('userlangattributes') ?>></div>
+                       <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes') ?>></div>
                        <?php if ( $this->data['sitenotice'] ): ?>
                        <!-- sitenotice -->
                        <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
@@ -469,7 +490,7 @@ class VectorTemplate extends QuickTemplate {
                                <h3 id="siteSub"><?php $this->msg( 'tagline' ) ?></h3>
                                <!-- /tagline -->
                                <!-- subtitle -->
-                               <div id="contentSub" <?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
+                               <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
                                <!-- /subtitle -->
                                <?php if ( $this->data['undelete'] ): ?>
                                <!-- undelete -->
@@ -484,7 +505,7 @@ class VectorTemplate extends QuickTemplate {
                                <?php if ( $this->data['showjumplinks'] ): ?>
                                <!-- jumpto -->
                                <div id="jump-to-nav">
-                                       <?php $this->msg( 'jumpto' ) ?><a href="#head"><?php $this->msg( 'jumptonavigation' ) ?></a>,
+                                       <?php $this->msg( 'jumpto' ) ?> <a href="#mw-head"><?php $this->msg( 'jumptonavigation' ) ?></a>,
                                        <a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
                                </div>
                                <!-- /jumpto -->
@@ -508,7 +529,7 @@ class VectorTemplate extends QuickTemplate {
                </div>
                <!-- /content -->
                <!-- header -->
-               <div id="head" class="noprint">
+               <div id="mw-head" class="noprint">
                        <?php $this->renderNavigation( 'PERSONAL' ); ?>
                        <div id="left-navigation">
                                <?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
@@ -519,7 +540,7 @@ class VectorTemplate extends QuickTemplate {
                </div>
                <!-- /header -->
                <!-- panel -->
-                       <div id="panel" class="noprint">
+                       <div id="mw-panel" class="noprint">
                                <!-- logo -->
                                        <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo $this->skin->tooltipAndAccesskey( 'p-logo' ) ?>></a></div>
                                <!-- /logo -->
@@ -527,10 +548,10 @@ class VectorTemplate extends QuickTemplate {
                        </div>
                <!-- /panel -->
                <!-- footer -->
-               <div id="footer" <?php $this->html('userlangattributes') ?>>
+               <div id="footer"<?php $this->html('userlangattributes') ?>>
                        <?php foreach( $validFooterLinks as $category => $links ): ?>
                                <?php if ( count( $links ) > 0 ): ?>
-                               <ul id="footer-<?php echo $category ?>">
+                               <ul id="footer-<?php echo $category ?>"<?php if (isset($footerlinksClasses[$category])) echo ' class="' . implode(" ", $footerlinksClasses[$category]) . '"'; ?>>
                                        <?php foreach( $links as $link ): ?>
                                                <?php if( isset( $this->data[$link] ) && $this->data[$link] ): ?>
                                                <li id="footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->html( $link ) ?></li>
@@ -539,14 +560,6 @@ class VectorTemplate extends QuickTemplate {
                                </ul>
                                <?php endif; ?>
                        <?php endforeach; ?>
-                       <ul id="footer-icons" class="noprint">
-                               <?php if ( $this->data['poweredbyico'] ): ?>
-                               <li id="footer-icon-poweredby"><?php $this->html( 'poweredbyico' ) ?></li>
-                               <?php endif; ?>
-                               <?php if ( $this->data['copyrightico'] ): ?>
-                               <li id="footer-icon-copyright"><?php $this->html( 'copyrightico' ) ?></li>
-                               <?php endif; ?>
-                       </ul>
                        <div style="clear:both"></div>
                </div>
                <!-- /footer -->
@@ -580,7 +593,7 @@ class VectorTemplate extends QuickTemplate {
                                case 'TOOLBOX':
 ?>
 <div class="portal" id="p-tb">
-       <h5 <?php $this->html('userlangattributes') ?>><?php $this->msg( 'toolbox' ) ?></h5>
+       <h5<?php $this->html('userlangattributes') ?>><?php $this->msg( 'toolbox' ) ?></h5>
        <div class="body">
                <ul>
                <?php if( $this->data['notspecialpage'] ): ?>
@@ -612,7 +625,6 @@ class VectorTemplate extends QuickTemplate {
                <?php elseif ( $this->data['nav_urls']['permalink']['href'] === '' ): ?>
                <li id="t-ispermalink"<?php echo $this->skin->tooltip( 't-ispermalink' ) ?>><?php $this->msg( 'permalink' ) ?></li>
                <?php endif; ?>
-               <?php wfRunHooks( 'VectorTemplateToolboxEnd', array( &$this ) ); ?>
                <?php wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?>
                </ul>
        </div>
@@ -623,11 +635,11 @@ class VectorTemplate extends QuickTemplate {
                                        if ( $this->data['language_urls'] ) {
 ?>
 <div class="portal" id="p-lang">
-       <h5 <?php $this->html('userlangattributes') ?>><?php $this->msg( 'otherlanguages' ) ?></h5>
+       <h5<?php $this->html('userlangattributes') ?>><?php $this->msg( 'otherlanguages' ) ?></h5>
        <div class="body">
                <ul>
                <?php foreach ( $this->data['language_urls'] as $langlink ): ?>
-                       <li class="<?php echo htmlspecialchars(  $langlink['class'] ) ?>"><a href="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php echo $langlink['text'] ?></a></li>
+                       <li class="<?php echo htmlspecialchars(  $langlink['class'] ) ?>"><a href="<?php echo htmlspecialchars( $langlink['href'] ) ?>" title="<?php echo htmlspecialchars( $langlink['title'] ) ?>"><?php echo $langlink['text'] ?></a></li>
                <?php endforeach; ?>
                </ul>
        </div>
@@ -638,7 +650,7 @@ class VectorTemplate extends QuickTemplate {
                                default:
 ?>
 <div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo $this->skin->tooltip( 'p-' . $name ) ?>>
-       <h5 <?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?></h5>
+       <h5<?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?></h5>
        <div class="body">
                <?php if ( is_array( $content ) ): ?>
                <ul>
@@ -663,7 +675,7 @@ class VectorTemplate extends QuickTemplate {
         * when UI is in RTL mode
         */
        private function renderNavigation( $elements ) {
-               global $wgContLang, $wgVectorUseSimpleSearch, $wgStylePath;
+               global $wgContLang, $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
 
                // If only one element was given, wrap it in an array, allowing more
                // flexible arguments
@@ -681,7 +693,7 @@ class VectorTemplate extends QuickTemplate {
 ?>
 <div id="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><?php $this->msg('namespaces') ?></h5>
-       <ul <?php $this->html('userlangattributes') ?>>
+       <ul<?php $this->html('userlangattributes') ?>>
                <?php foreach ($this->data['namespace_urls'] as $key => $link ): ?>
                        <li <?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><span><?php echo htmlspecialchars( $link['text'] ) ?></span></a></li>
                <?php endforeach; ?>
@@ -692,10 +704,19 @@ class VectorTemplate extends QuickTemplate {
                                case 'VARIANTS':
 ?>
 <div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+       <?php if ( $wgVectorShowVariantName ): ?>
+               <h4>
+               <?php foreach ( $this->data['variant_urls'] as $key => $link ): ?>
+                       <?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
+                               <?php echo htmlspecialchars( $link['text'] ) ?>
+                       <?php endif; ?>
+               <?php endforeach; ?>
+               </h4>
+       <?php endif; ?>
        <h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
        <div class="menu">
-               <ul <?php $this->html('userlangattributes') ?>>
-                       <?php foreach ($this->data['variant_urls'] as $key => $link ): ?>
+               <ul<?php $this->html('userlangattributes') ?>>
+                       <?php foreach ( $this->data['variant_urls'] as $key => $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; ?>
                </ul>
@@ -707,8 +728,8 @@ class VectorTemplate extends QuickTemplate {
 ?>
 <div id="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><?php $this->msg('views') ?></h5>
-       <ul <?php $this->html('userlangattributes') ?>>
-               <?php foreach ($this->data['view_urls'] as $key => $link ): ?>
+       <ul<?php $this->html('userlangattributes') ?>>
+               <?php foreach ( $this->data['view_urls'] as $key => $link ): ?>
                        <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ?  '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li>
                <?php endforeach; ?>
        </ul>
@@ -720,7 +741,7 @@ class VectorTemplate extends QuickTemplate {
 <div id="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><span><?php $this->msg('actions') ?></span><a href="#"></a></h5>
        <div class="menu">
-               <ul <?php $this->html('userlangattributes') ?>>
+               <ul<?php $this->html('userlangattributes') ?>>
                        <?php foreach ($this->data['action_urls'] as $key => $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; ?>
@@ -733,7 +754,7 @@ class VectorTemplate extends QuickTemplate {
 ?>
 <div id="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><?php $this->msg('personaltools') ?></h5>
-       <ul <?php $this->html('userlangattributes') ?>>
+       <ul<?php $this->html('userlangattributes') ?>>
                <?php foreach($this->data['personal_urls'] as $key => $item): ?>
                        <li <?php echo $item['attributes'] ?>><a href="<?php echo htmlspecialchars($item['href']) ?>"<?php echo $item['key'] ?><?php if(!empty($item['class'])): ?> class="<?php echo htmlspecialchars($item['class']) ?>"<?php endif; ?>><?php echo htmlspecialchars($item['text']) ?></a></li>
                <?php endforeach; ?>
@@ -744,13 +765,13 @@ class VectorTemplate extends QuickTemplate {
                                case 'SEARCH':
 ?>
 <div id="p-search">
-       <h5 <?php $this->html('userlangattributes') ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
+       <h5<?php $this->html('userlangattributes') ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
        <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
                <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
-               <?php if ( $wgVectorUseSimpleSearch ): ?>
+               <?php if ( $wgVectorUseSimpleSearch && $wgUser->getOption( 'vector-simplesearch' ) ): ?>
                <div id="simpleSearch">
                        <input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> />
-                       <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>>&nbsp;</button>
+                       <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>>&#160;</button>
                </div>
                <?php else: ?>
                <input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> />