From eaa57eab3438df7a8fcc91a9f15d17746905782b Mon Sep 17 00:00:00 2001 From: Daniel Cannon Date: Sun, 26 Aug 2007 04:54:43 +0000 Subject: [PATCH] (bug 10347) Added subtle message to subtitle indicating that the page currently being viewed is protected. Could perhaps be a bit more subtle by default though ... --- RELEASE-NOTES | 2 ++ includes/Article.php | 8 ++++++++ languages/messages/MessagesEn.php | 1 + 3 files changed, 11 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2b24739d29..7e6725cd48 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -412,6 +412,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Resizing transparent GIF images with GD now retains transparency by skipping resampling * (bug 11065) Fix regression in handling of wiki-formatted EXIF metadata +* (bug 10347) Add subtitle message to indicate that the page being viewed is + protected. == API changes since 1.10 == diff --git a/includes/Article.php b/includes/Article.php index 5bb5915eb3..21d8697c1e 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -740,6 +740,14 @@ class Article { } } + if ( $this->mTitle->isProtected() ) { + $editrestr = $this->mTitle->getRestrictions('edit'); + $moverestr = $this->mTitle->getRestrictions('move'); + $wgOut->setSubtitle($wgOut->getSubtitle() . + wfMsg( 'protected-subtitle', + $editrestr[0], $moverestr[0] ) ); + } + $outputDone = false; wfRunHooks( 'ArticleViewHeader', array( &$this, &$outputDone, &$pcache ) ); if ( $pcache ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 04ed19495b..437fdbb040 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -797,6 +797,7 @@ $2", 'namespaceprotected' => "You do not have permission to edit pages in the '''$1''' namespace.", 'customcssjsprotected' => "You do not have permission to edit this page, because it contains another user's personal settings.", 'ns-specialprotected' => "Pages in the {{ns:special}} namespace cannot be edited.", +'protected-subtitle' => " (This page is protected.)", # Login and logout pages 'logouttitle' => 'User logout', -- 2.20.1