From 83bfa5a935a4408742677b36eba0d480a9270cb0 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 17 Sep 2004 16:31:38 +0000 Subject: [PATCH] Fix bug http://bugzilla.wikipedia.org/show_bug.cgi?id=502 . Implement allow quickbar suppression in PHPTal skins, error pages suppress quickbars --- RELEASE-NOTES | 1 + includes/OutputPage.php | 4 +++- includes/SkinPHPTal.php | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index abecaa9c9c..8ad8765657 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -20,6 +20,7 @@ Major changes from 1.3.x: * Skins system more modular: templates and CSS are now in /skins/ * New user preference for limitting the image size for images on image description pages +* Error pages no more offer edit / talk / watch links (bug #502) * ... and more! === Caveats === diff --git a/includes/OutputPage.php b/includes/OutputPage.php index d51697f881..a7af0442ff 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1,6 +1,6 @@ setHTMLTitle( wfMsg( 'errorpagetitle' ) ); $this->setRobotpolicy( 'noindex,nofollow' ); $this->setArticleRelated( false ); + $this->suppressQuickbar(); + $this->enableClientCache( false ); $this->mRedirect = ''; diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index 0000dfc52b..0a5fe479d0 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -358,14 +358,14 @@ class SkinPHPTal extends Skin { * an array of edit links by default used for the tabs */ function buildContentActionUrls () { - global $wgTitle, $wgUser, $wgRequest, $wgUseValidation; + global $wgTitle, $wgUser, $wgOut, $wgRequest, $wgUseValidation; $action = $wgRequest->getText( 'action' ); $section = $wgRequest->getText( 'section' ); $oldid = $wgRequest->getVal( 'oldid' ); $diff = $wgRequest->getVal( 'diff' ); $content_actions = array(); - if( $this->iscontent ) { + if( $this->iscontent and !$wgOut->isQuickbarSuppressed() ) { $nskey = $this->getNameSpaceKey(); $is_active = !Namespace::isTalk( $wgTitle->getNamespace()) ; -- 2.20.1