From 7529d1e84119e1ddbc6d94c863557f495cf6cd38 Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Thu, 27 Sep 2007 20:43:30 +0000 Subject: [PATCH] If the page doesn't exist and the user can't create it, omit the "edit"/"view source" tab entirely (since the user can't edit and there's no source to view). --- RELEASE-NOTES | 2 ++ includes/SkinTemplate.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1da6d9bcce..9fa7ccd30a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 6ce4060640..ff2e2ecd94 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -685,7 +685,7 @@ class SkinTemplate extends Skin { 'href' => $this->mTitle->getLocalUrl( 'action=edit§ion=new' ) ); } - } else { + } elseif ( $this->mTitle->exists() ) { $content_actions['viewsource'] = array( 'class' => ($action == 'edit') ? 'selected' : false, 'text' => wfMsg('viewsource'), -- 2.20.1