Fixes to OutputPage's documentation
[lhc/web/wiklou.git] / skins / Standard.php
index 69da703..f7a2435 100644 (file)
@@ -14,19 +14,12 @@ if( !defined( 'MEDIAWIKI' ) )
  * @ingroup Skins
  */
 class SkinStandard extends Skin {
-
-       /**
-        *
+       /*
+        * OutputPage
         */
-       function getHeadScripts( $allowUserJs ) {
-               global $wgStylePath, $wgJsMimeType, $wgStyleVersion;
-
-               $s = parent::getHeadScripts( $allowUserJs );
-               if ( 3 == $this->qbSetting() ) { # Floating left
-                       $s .= "<script language='javascript' type='$wgJsMimeType' " .
-                         "src='{$wgStylePath}/common/sticky.js?$wgStyleVersion'></script>\n";
-               }
-               return $s;
+       function outputPage( OutputPage $out ) {
+               global $wgStylePath;
+               parent::outputPage( $out );
        }
 
        /**
@@ -63,23 +56,6 @@ class SkinStandard extends Skin {
                return $s;
        }
 
-       /**
-        *
-        */
-       function getBodyOptions() {
-               $a = parent::getBodyOptions();
-
-               if ( 3 == $this->qbSetting() ) { # Floating left
-                       $qb = "setup(\"quickbar\")";
-                       if( $a['onload'] ) {
-                               $a['onload'] .= ";$qb";
-                       } else {
-                               $a['onload'] = $qb;
-                       }
-               }
-               return $a;
-       }
-
        function doAfterContent() {
                global $wgContLang, $wgLang;
                wfProfileIn( __METHOD__ );
@@ -102,7 +78,7 @@ class SkinStandard extends Skin {
                }
                wfProfileOut( __METHOD__ . '-2' );
                wfProfileIn( __METHOD__ . '-3' );
-               $l = $wgContLang->isRTL() ? 'right' : 'left';
+               $l = $wgContLang->alignStart();
                $s .= "<td class='bottom' align='$l' valign='top'>";
 
                $s .= $this->bottomLinks();
@@ -160,8 +136,12 @@ class SkinStandard extends Skin {
 
                if( $wgUser->isLoggedIn() ) {
                        $s.= $this->specialLink( 'watchlist' ) ;
-                       $s .= $sep . $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
-                               wfMsg( 'mycontris' ), 'target=' . wfUrlencode( $wgUser->getName() ) );
+                       $s .= $sep . $this->linkKnown(
+                               SpecialPage::getTitleFor( 'Contributions' ),
+                               wfMsg( 'mycontris' ),
+                               array(),
+                               array( 'target' => $wgUser->getName() )
+                       );
                }
                // only show watchlist link if logged in
                $s .= "\n<hr class='sep' />";
@@ -215,21 +195,32 @@ class SkinStandard extends Skin {
                                                $link = $nstext . ':' . $link;
                                        }
 
-                                       $s .= $this->makeLink( $link, $text );
+                                       $s .= $this->link(
+                                               Title::newFromText( $link ),
+                                               $text
+                                       );
                                } elseif( $this->mTitle->getNamespace() != NS_SPECIAL ) {
                                        # we just throw in a "New page" text to tell the user that he's in edit mode,
                                        # and to avoid messing with the separator that is prepended to the next item
                                        $s .= '<strong>' . wfMsg( 'newpage' ) . '</strong>';
                                }
-
                        }
 
                        # "Post a comment" link
                        if( ( $this->mTitle->isTalkPage() || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview )
-                               $s .= '<br />' . $this->makeKnownLinkObj( $this->mTitle, wfMsg( 'postcomment' ), 'action=edit&section=new' );
-                       
+                               $s .= '<br />' . $this->link(
+                                       $this->mTitle,
+                                       wfMsg( 'postcomment' ),
+                                       array(),
+                                       array(
+                                               'action' => 'edit',
+                                               'section' => 'new'
+                                       ),
+                                       array( 'known', 'noclasses' )
+                               );
+
                        #if( $tns%2 && $action!='edit' && !$wpPreview) {
-                               #$s.= '<br />'.$this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('postcomment'),'action=edit&section=new');
+                               #$s.= '<br />'.$this->linkKnown( Title::newFromText( $wgTitle->getPrefixedText() ),wfMsg('postcomment'),array(),array('action'=>'edit','section'=>'new'));
                        #}
 
                        /*