'View source' link instead of 'protected page'
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 25 Dec 2003 03:25:17 +0000 (03:25 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 25 Dec 2003 03:25:17 +0000 (03:25 +0000)
includes/Skin.php

index ca10163..7768c34 100644 (file)
@@ -897,9 +897,14 @@ class Skin {
 
                if ( ! $wgOut->isArticle() || $diff ) {
                        $s = wfMsg( "protectedpage" );
-               } else if ( $wgTitle->userCanEdit() ) {
+               } else {
                        $n = $wgTitle->getPrefixedText();
-                       $t = wfMsg( "editthispage" );
+                       if ( $wgTitle->userCanEdit() ) {
+                               $t = wfMsg( "editthispage" );
+                       } else {
+                               #$t = wfMsg( "protectedpage" );
+                               $t = wfMsg( "viewsource" );
+                       }
                        $oid = $red = "";
 
                        if ( $redirect ) { $red = "&redirect={$redirect}"; }
@@ -907,8 +912,6 @@ class Skin {
                                $oid = "&oldid={$oldid}";
                        }
                        $s = $this->makeKnownLink( $n, $t, "action=edit{$oid}{$red}" );
-               } else {
-                       $s = wfMsg( "protectedpage" );
                }
                return $s;
        }