If the page doesn't exist and the user can't create it, omit the "edit"/"view source"
authorIlmari Karonen <vyznev@users.mediawiki.org>
Thu, 27 Sep 2007 20:43:30 +0000 (20:43 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Thu, 27 Sep 2007 20:43:30 +0000 (20:43 +0000)
tab entirely (since the user can't edit and there's no source to view).

RELEASE-NOTES
includes/SkinTemplate.php

index 1da6d9b..9fa7ccd 100644 (file)
@@ -30,6 +30,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5412) Add feed links for the site to all pages
 * (bug 11353) Add ability to retrieve raw section content via action=raw
 * Show relevant deletion log lines when uploading a previously deleted file
+* On SkinTemplate based skins (like MonoBook), omit confusing "edit"/"view source"
+  tab entirely if the page doesn't exist and the user isn't allowed to create it
 
 === Bug fixes in 1.12 ===
 
index 6ce4060..ff2e2ec 100644 (file)
@@ -685,7 +685,7 @@ class SkinTemplate extends Skin {
                                                'href' => $this->mTitle->getLocalUrl( 'action=edit&section=new' )
                                        );
                                }
-                       } else {
+                       } elseif ( $this->mTitle->exists() ) {
                                $content_actions['viewsource'] = array(
                                        'class' => ($action == 'edit') ? 'selected' : false,
                                        'text' => wfMsg('viewsource'),