Use member variable defaults for SkinTemplate
[lhc/web/wiklou.git] / skins / Vector.php
index f9f1c09..5007a5f 100644 (file)
@@ -18,6 +18,8 @@ if( !defined( 'MEDIAWIKI' ) )
 class SkinVector extends SkinTemplate {
 
        /* Functions */
+       var $skinname = $stylename = 'vector',
+               $template = 'VectorTemplate';
 
        /**
         * Initializes output page and sets up skin-specific parameters
@@ -27,9 +29,6 @@ class SkinVector extends SkinTemplate {
                global $wgStylePath, $wgJsMimeType, $wgStyleVersion;
                
                parent::initPage( $out );
-               $this->skinname  = 'vector';
-               $this->stylename = 'vector';
-               $this->template  = 'VectorTemplate';
                
                // Append skin-specific styles
                $out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );
@@ -718,7 +717,7 @@ class VectorTemplate extends QuickTemplate {
        <div class="menu">
                <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>
+                               <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo str_replace( ' ', '&nbsp;', htmlspecialchars( $link['text'] ) ) ?></a></li>
                        <?php endforeach; ?>
                </ul>
        </div>
@@ -748,7 +747,7 @@ class VectorTemplate extends QuickTemplate {
        <div class="menu">
                <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>
+                               <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo str_replace( ' ', '&nbsp;', htmlspecialchars( $link['text'] ) ) ?></a></li>
                        <?php endforeach; ?>
                </ul>
        </div>
@@ -779,7 +778,7 @@ class VectorTemplate extends QuickTemplate {
                <?php if ( $wgVectorUseSimpleSearch ): ?>
                <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; ?> />
-                       <input  id="searchButton" type='image' name='fulltext' src="<?php echo $wgStylePath ?>/vector/images/search.png" <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> align="top" />
+                       <button id="searchButton" type='submit' name='fulltext' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>>&nbsp;</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; ?> />