(bug 4876) Add __NEWSECTIONLINK__ magic word to force the "new section" link/tab...
[lhc/web/wiklou.git] / skins / Standard.php
index 067496f..40fe624 100644 (file)
@@ -52,7 +52,7 @@ class SkinStandard extends Skin {
         *
         */
        function doGetUserStyles() {
-               global $wgUser, $wgOut, $wgStylePath;
+               global $wgStylePath;
 
                $s = parent::doGetUserStyles();
                $qb = $this->qbSetting();
@@ -90,7 +90,7 @@ class SkinStandard extends Skin {
        }
 
        function doAfterContent() {
-               global $wgUser, $wgOut, $wgContLang;
+               global $wgContLang;
                $fname =  'SkinStandard::doAfterContent';
                wfProfileIn( $fname );
                wfProfileIn( $fname.'-1' );
@@ -219,10 +219,13 @@ class SkinStandard extends Skin {
 
                        }
 
-
-                       if( $tns%2 && $action!='edit' && !$wpPreview) {
-                               $s.= '<br />'.$this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('postcomment'),'action=edit&section=new');
-                       }
+                       # "Post a comment" link
+                       if( ( $tns % 2 || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview )
+                               $s .= '<br />' . $this->makeKnownLinkObj( $wgTitle, wfMsg( 'postcomment' ), 'action=edit&section=new' );
+                       
+                       #if( $tns%2 && $action!='edit' && !$wpPreview) {
+                               #$s.= '<br />'.$this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('postcomment'),'action=edit&section=new');
+                       #}
 
                        /*
                        watching could cause problems in edit mode: