]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - skins/Standard.php
MediaWiki 1.15.0
[autoinstallsdev/mediawiki.git] / skins / Standard.php
index ed00d59daacf4fc8209eacc9a53515bd2c8d0b19..694bc5e389a3db0bef2a03664ba7c4c383fb9ab1 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,7 +12,7 @@ if( !defined( 'MEDIAWIKI' ) )
 
 /**
  * @todo document
- * @addtogroup Skins
+ * @ingroup Skins
  */
 class SkinStandard extends Skin {
 
@@ -32,40 +33,33 @@ 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
                        $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " .
                          "border-left: 2px solid #000000; }\n" .
-                         "#article { margin-left: 4px; margin-right: 152px; }\n";
+                         "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n";
                } else if ( 1 == $qb || 3 == $qb ) {
                        $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " .
                          "border-right: 1px solid gray; }\n" .
-                         "#article { margin-left: 152px; margin-right: 4px; }\n";
+                         "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n";
                } else if ( 4 == $qb) {
                        $s .= "#quickbar { border-right: 1px solid gray; }\n" .
-                         "#article { margin-right: 152px; margin-left: 4px; }\n";
+                         "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n";
                }
                return $s;
        }
@@ -88,7 +82,7 @@ class SkinStandard extends Skin {
        }
 
        function doAfterContent() {
-               global $wgContLang;
+               global $wgContLang, $wgLang;
                $fname =  'SkinStandard::doAfterContent';
                wfProfileIn( $fname );
                wfProfileIn( $fname.'-1' );
@@ -114,10 +108,11 @@ class SkinStandard extends Skin {
                $s .= "<td class='bottom' align='$l' valign='top'>";
 
                $s .= $this->bottomLinks();
-               $s .= "\n<br />" . $this->mainPageLink()
-                 . ' | ' . $this->aboutLink()
-                 . ' | ' . $this->specialLink( 'recentchanges' )
-                 . ' | ' . $this->searchForm()
+               $s .= "\n<br />" . $wgLang->pipeList( array(
+                       $this->mainPageLink(),
+                       $this->aboutLink(),
+                       $this->specialLink( 'recentchanges' ),
+                       $this->searchForm() ) )
                  . '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
 
                $s .= "</td>";
@@ -152,6 +147,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 ) {
@@ -178,7 +176,7 @@ class SkinStandard extends Skin {
                                                case NS_TALK:
                                                case NS_USER_TALK:
                                                case NS_PROJECT_TALK:
-                                               case NS_IMAGE_TALK:
+                                               case NS_FILE_TALK:
                                                case NS_MEDIAWIKI_TALK:
                                                case NS_TEMPLATE_TALK:
                                                case NS_HELP_TALK:
@@ -194,7 +192,7 @@ class SkinStandard extends Skin {
                                                case NS_PROJECT:
                                                        $text = wfMsg( 'projectpage' );
                                                        break;
-                                               case NS_IMAGE:
+                                               case NS_FILE:
                                                        $text = wfMsg( 'imagepage' );
                                                        break;
                                                case NS_MEDIAWIKI:
@@ -269,7 +267,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 ) ) {
@@ -282,8 +280,7 @@ class SkinStandard extends Skin {
                if ( $wgUser->isLoggedIn() && ( $wgEnableUploads || $wgRemoteUploads ) ) {
                        $s .= $this->specialLink( 'upload' ) . $sep;
                }
-               $s .= $this->specialLink( 'specialpages' )
-                 . $sep . $this->bugReportsLink();
+               $s .= $this->specialLink( 'specialpages' );
 
                global $wgSiteSupportPage;
                if( $wgSiteSupportPage ) {
@@ -298,5 +295,3 @@ class SkinStandard extends Skin {
 
 
 }
-
-