Avoid notice error when user doesn't have right to move a page.
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 22 Jan 2005 06:11:10 +0000 (06:11 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 22 Jan 2005 06:11:10 +0000 (06:11 +0000)
includes/Skin.php

index ea29fd8..1b60a94 100644 (file)
@@ -1026,10 +1026,12 @@ class Skin extends Linker {
                global $wgTitle, $wgContLang;
 
                if ( $wgTitle->userCanMove() ) {
-                       $s = $this->makeKnownLink( $wgContLang->specialPage( 'Movepage' ),
+                       return $this->makeKnownLink( $wgContLang->specialPage( 'Movepage' ),
                          wfMsg( 'movethispage' ), 'target=' . $wgTitle->getPrefixedURL() );
-               } // no message if page is protected - would be redundant
-               return $s;
+               } else {
+                       // no message if page is protected - would be redundant
+                       return '';
+               }
        }
 
        function historyLink() {