From: Daniel Cannon Date: Sun, 26 Aug 2007 04:54:43 +0000 (+0000) Subject: (bug 10347) Added subtle message to subtitle indicating that the page currently being... X-Git-Tag: 1.31.0-rc.0~51660 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=eaa57eab3438df7a8fcc91a9f15d17746905782b;p=lhc%2Fweb%2Fwiklou.git (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 ... --- 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',