(bug 10347) Added subtle message to subtitle indicating that the page currently being...
authorDaniel Cannon <amidaniel@users.mediawiki.org>
Sun, 26 Aug 2007 04:54:43 +0000 (04:54 +0000)
committerDaniel Cannon <amidaniel@users.mediawiki.org>
Sun, 26 Aug 2007 04:54:43 +0000 (04:54 +0000)
RELEASE-NOTES
includes/Article.php
languages/messages/MessagesEn.php

index 2b24739..7e6725c 100644 (file)
@@ -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 ==
index 5bb5915..21d8697 100644 (file)
@@ -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 ) {
index 04ed194..437fdbb 100644 (file)
@@ -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 message will be displayed as the subtitle for pages that are protected. The argument $1 is the level of edit-protection (i.e., sysop or autoconfirmed), and $2 is the level of move-protection. --> (This page is protected.)",
 
 # Login and logout pages
 'logouttitle'                => 'User logout',