Fix to #17031. See bug ticket for test code & test-results.
[lhc/web/wiklou.git] / skins / Vector.php
index 3692651..3479ba5 100644 (file)
@@ -37,7 +37,7 @@ class SkinVector extends SkinTemplate {
                $out->addScript(
                        '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
                                htmlspecialchars( $wgLocalStylePath ) .
-                               '/vector/csshover.htc")}</style><![endif]-->'
+                               "/{$this->stylename}/csshover.htc\")}</style><![endif]-->"
                );
        }
 
@@ -52,14 +52,14 @@ class SkinVector extends SkinTemplate {
                parent::setupSkinUserCss( $out );
 
                // Append skin-specific styles
-               $out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );
-               $out->addStyle( 'vector/main-ltr.css', 'screen', '', 'ltr' );
+               $out->addStyle( "{$this->stylename}/main-rtl.css", 'screen', '', 'rtl' );
+               $out->addStyle( "{$this->stylename}/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 ) ) {
                        foreach ( $wgVectorExtraStyles as $style ) {
-                               $out->addStyle( 'vector/' . $style, 'screen' );
+                               $out->addStyle( "vector/$style", 'screen' );
                        }
                }
        }
@@ -103,7 +103,6 @@ class SkinVector extends SkinTemplate {
                        } else {
                                $talkId = "{$subjectId}_talk";
                        }
-                       $currentId = $isTalk ? $talkId : $subjectId;
 
                        // Adds namespace links
                        $links['namespaces'][$subjectId] = $this->tabAction(
@@ -293,7 +292,7 @@ class SkinVector extends SkinTemplate {
                        // Checks if the user is logged in
                        if ( $this->loggedin ) {
                                if ( $wgVectorUseIconWatch ) {
-                                       $class = 'icon ';
+                                       $class = 'icon';
                                        $place = 'views';
                                } else {
                                        $class = '';
@@ -367,7 +366,7 @@ class VectorTemplate extends QuickTemplate {
         * Outputs the entire contents of the XHTML page
         */
        public function execute() {
-               global $wgRequest, $wgOut, $wgContLang;
+               global $wgRequest, $wgContLang;
 
                $this->skin = $this->data['skin'];
                $action = $wgRequest->getText( 'action' );
@@ -487,7 +486,7 @@ class VectorTemplate extends QuickTemplate {
                        <!-- bodyContent -->
                        <div id="bodyContent">
                                <!-- tagline -->
-                               <h3 id="siteSub"><?php $this->msg( 'tagline' ) ?></h3>
+                               <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
                                <!-- /tagline -->
                                <!-- subtitle -->
                                <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
@@ -675,7 +674,7 @@ class VectorTemplate extends QuickTemplate {
         * when UI is in RTL mode
         */
        private function renderNavigation( $elements ) {
-               global $wgContLang, $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
+               global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
 
                // If only one element was given, wrap it in an array, allowing more
                // flexible arguments
@@ -771,7 +770,7 @@ class VectorTemplate extends QuickTemplate {
                <?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' ); ?>>&#160;</button>
+                       <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>><img src="<?php echo $GLOBALS['wgStylePath'] . "/{$this->skin->stylename}/images/search-" . ( $GLOBALS['wgContLang']->isRTL() ? 'rtl' : 'ltr' ) . '.png?' . $GLOBALS['wgStyleVersion'] ?>" alt="<?php $this->msg( 'searchbutton' ) ?>" /></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; ?> />