From: Rotem Liss Date: Sat, 1 Jul 2006 12:07:47 +0000 (+0000) Subject: Also checking if the user can create the page if not exist, not only if he can edit... X-Git-Tag: 1.31.0-rc.0~56498 X-Git-Url: http://git.cyclocoop.org//%27http:/jquery.khurshid.com/ifixpng.php/%27?a=commitdiff_plain;h=6d471c5ef37f96a5bfd227708f9afed15250b93b;p=lhc%2Fweb%2Fwiklou.git Also checking if the user can create the page if not exist, not only if he can edit it, to decide if we should show 'edit' or 'view source'. --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index ce24659114..6657d38180 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -622,7 +622,7 @@ class SkinTemplate extends Skin { true); wfProfileIn( "$fname-edit" ); - if ( $this->mTitle->userCanEdit() ) { + if ( $this->mTitle->userCanEdit() && ( $this->mTitle->exists() || $this->mTitle->userCanCreate() ) ) { $istalk = $this->mTitle->isTalkPage(); $istalkclass = $istalk?' istalk':''; $content_actions['edit'] = array(