bug #15602: use echo for error messages if STDERR is undefined
[lhc/web/wiklou.git] / skins / Standard.php
index f79571a..9b65de7 100644 (file)
@@ -1,9 +1,10 @@
 <?php
 /**
- * See skin.txt
+ * See docs/skin.txt
  *
  * @todo document
- * @addtogroup Skins
+ * @file
+ * @ingroup Skins
  */
 
 if( !defined( 'MEDIAWIKI' ) )
@@ -11,17 +12,17 @@ if( !defined( 'MEDIAWIKI' ) )
 
 /**
  * @todo document
- * @addtogroup Skins
+ * @ingroup Skins
  */
 class SkinStandard extends Skin {
 
        /**
         *
         */
-       function getHeadScripts() {
+       function getHeadScripts( $allowUserJs ) {
                global $wgStylePath, $wgJsMimeType, $wgStyleVersion;
 
-               $s = parent::getHeadScripts();
+               $s = parent::getHeadScripts( $allowUserJs );
                if ( 3 == $this->qbSetting() ) { # Floating left
                        $s .= "<script language='javascript' type='$wgJsMimeType' " .
                          "src='{$wgStylePath}/common/sticky.js?$wgStyleVersion'></script>\n";
@@ -32,27 +33,20 @@ class SkinStandard extends Skin {
        /**
         *
         */
-       function getUserStyles() {
-               global $wgStylePath, $wgStyleVersion;
-               $s = '';
+       function setupSkinUserCss( OutputPage $out ){
                if ( 3 == $this->qbSetting() ) { # Floating left
-                       $s .= "<style type='text/css'>\n" .
-                         "@import '{$wgStylePath}/common/quickbar.css?$wgStyleVersion';\n</style>\n";
+                       $out->addStyle( 'common/quickbar.css' );
                } else if ( 4 == $this->qbSetting() ) { # Floating right
-                       $s .= "<style type='text/css'>\n" .
-                         "@import '{$wgStylePath}/common/quickbar-right.css?$wgStyleVersion';\n</style>\n";
+                       $out->addStyle( 'common/quickbar-right.css' );
                }
-               $s .= parent::getUserStyles();
-               return $s;
+               parent::setupSkinUserCss( $out );
        }
 
        /**
         *
         */
-       function doGetUserStyles() {
-               global $wgStylePath;
-
-               $s = parent::doGetUserStyles();
+       function reallyGenerateUserStylesheet() {
+               $s = parent::reallyGenerateUserStylesheet();
                $qb = $this->qbSetting();
 
                if ( 2 == $qb ) { # Right
@@ -152,6 +146,9 @@ class SkinStandard extends Skin {
 
                # Use the first heading from the Monobook sidebar as the "browse" section
                $bar = $this->buildSidebar();
+               unset( $bar['SEARCH'] );
+               unset( $bar['LANGUAGES'] );
+               unset( $bar['TOOLBOX'] );
                $browseLinks = reset( $bar );
 
                foreach ( $browseLinks as $link ) {
@@ -269,7 +266,7 @@ class SkinStandard extends Skin {
                                $id=User::idFromName($wgTitle->getText());
                                $ip=User::isIP($wgTitle->getText());
 
-                               if($id||$ip) {
+                               if( $id || $ip ){
                                        $s .= $sep . $this->userContribsLink();
                                }
                                if( $this->showEmailUser( $id ) ) {
@@ -298,5 +295,3 @@ class SkinStandard extends Skin {
 
 
 }
-
-?>