Revert bug 10347 stuff -- too-big, too-prominent, too-technical subtitle slapped...
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 27 Aug 2007 21:05:19 +0000 (21:05 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 27 Aug 2007 21:05:19 +0000 (21:05 +0000)
This needs more work before going into trunk, which you'll remember is *what is live at any given time* except when we've got a problem going on.

RELEASE-NOTES
includes/Article.php
includes/OutputPage.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
languages/messages/MessagesHe.php
languages/messages/MessagesKk_cn.php
languages/messages/MessagesKk_kz.php
languages/messages/MessagesKk_tr.php
maintenance/language/messages.inc

index cb9ecad..9cfc838 100644 (file)
@@ -190,8 +190,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Add accesskey 's' and tooltip to 'upload file' button at Special:Upload
 * Introduced 'SkinAfterBottomScripts' hook; see docs/hooks.txt for
   more information
-* (bug 10347) Give notice when a page is viewed that is protected. Does not 
-  show for cascade protection however.
 
 == Bugfixes since 1.10 ==
 
@@ -414,8 +412,6 @@ 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.
 * Double encoding broke Special:Newpages for some languages
 * Adding a newline before the statistics footer, to prevent parsing problems
 * Preventing the TOC from appearing in Special:Statistics
index 6c02ec6..5bb5915 100644 (file)
@@ -740,11 +740,6 @@ class Article {
                        }
                }
 
-               if ( $this->mTitle->isProtected() ) {
-                       $editrestr = $this->mTitle->getRestrictions('edit');
-                       $this->addProtectionNotice( $editrestr );
-               }
-
                $outputDone = false;
                wfRunHooks( 'ArticleViewHeader', array( &$this, &$outputDone, &$pcache ) );
                if ( $pcache ) {
@@ -891,39 +886,6 @@ class Article {
                wfProfileOut( __METHOD__ );
        }
 
-       /*
-       * Output a notice that a page is protected. Only give details for edit
-       * restrictions. Cares only about the first permission in the arrays, which is
-       * part of a larger shitty inconsistency about requiring several permissions...
-       * @param Array $editrestr, edit restrictions
-       */
-       function addProtectionNotice( $editrestr ) {    
-               global $wgOut;
-
-               if( empty($editrestr) ) 
-                       return;
-
-               $permission = $editrestr[0];
-               $permission = ($permission=='sysop') ? 'protect' : $permission;
-               
-               $editGroups = '';
-               # Get groups that have each right
-               if( $permission ) {
-                       $editGroups = $wgOut->getGroupsWithPermission( $permission );
-                       $editGroups = implode( ', ', $editGroups );
-               }
-               # Use general messages if no groups found for a type
-               if( !$editGroups ) {
-                       $msg = wfMsgExt( 'protected-subtitle', array('parsemag'), $editrestr );
-               } else {
-                       $msg = wfMsgExt( 'protected-subtitle-edit', array('parsemag'), $editGroups, $editrestr );
-               }
-               if( $wgOut->getSubtitle() )
-                       $msg = " $msg";
-               
-               $wgOut->setSubtitle( $wgOut->getSubtitle() . $msg );
-       }
-
        function addTrackbacks() {
                global $wgOut, $wgUser;
 
index bbeb7a3..66fbb8d 100644 (file)
@@ -878,7 +878,7 @@ class OutputPage {
         * @param string $permission key required
         */
        public function permissionRequired( $permission ) {
-               global $wgUser;
+               global $wgGroupPermissions, $wgUser;
 
                $this->setPageTitle( wfMsg( 'badaccess' ) );
                $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) );
@@ -886,30 +886,6 @@ class OutputPage {
                $this->setArticleRelated( false );
                $this->mBodytext = '';
 
-               $groups = $this->getGroupsWithPermission( $permission );
-               $n = count( $groups );
-               $groups = implode( ', ', $groups );
-               switch( $n ) {
-                       case 0:
-                       case 1:
-                       case 2:
-                               $message = wfMsgHtml( "badaccess-group$n", $groups );
-                               break;
-                       default:
-                               $message = wfMsgHtml( 'badaccess-groups', $groups );
-               }
-               $this->addHtml( $message );
-               $this->returnToMain( false );
-       }
-       
-       /**
-        * Return an array of the groups in (UI name form) that have a permission
-        *
-        * @param string $permission key required
-        */     
-       public function getGroupsWithPermission( $permission ) {
-               global $wgUser, $wgGroupPermissions;
-
                $groups = array();
                foreach( $wgGroupPermissions as $key => $value ) {
                        if( isset( $value[$permission] ) && $value[$permission] == true ) {
@@ -923,7 +899,19 @@ class OutputPage {
                                }
                        }
                }
-               return $groups;
+               $n = count( $groups );
+               $groups = implode( ', ', $groups );
+               switch( $n ) {
+                       case 0:
+                       case 1:
+                       case 2:
+                               $message = wfMsgHtml( "badaccess-group$n", $groups );
+                               break;
+                       default:
+                               $message = wfMsgHtml( 'badaccess-groups', $groups );
+               }
+               $this->addHtml( $message );
+               $this->returnToMain( false );
        }
 
        /**
index 9cf5754..c92363d 100644 (file)
@@ -487,10 +487,6 @@ $2',
 'namespaceprotected'      => "Du hast keine Berechtigung, die Seite in dem '''$1'''-Namensraum zu bearbeiten.",
 'customcssjsprotected'    => 'Du bist nicht berechtigt diese Seite zu bearbeiten, da sie zu den persönlichen Einstellungen eines anderen Benutzers gehört.',
 'ns-specialprotected'     => 'Seiten im {{ns:special}}-Namensraum können nicht bearbeitet werden.',
-'protected-subtitle'      => '(Diese Seite ist geschützt)',
-'protected-subtitle-same' => '(Diese Seite ist geschützt. Benutzer der Gruppe(n) „$1“ können sie weiterhin bearbeiten oder verschieben.)',
-'protected-subtitle-each' => '(Diese Seite ist geschützt. Benutzer der Gruppe(n) „$1“ können sie weiterhin bearbeiten und Benutzer der Gruppe(n) „$2“ verschieben.)',
-'protected-anyone'        => 'Jeder',
 
 # Login and logout pages
 'logouttitle'                => 'Benutzer-Abmeldung',
index a947f66..1b0e60b 100644 (file)
@@ -794,11 +794,9 @@ Query: $2',
 'sqlhidden'            => '(SQL query hidden)',
 'cascadeprotected'     => "This page has been protected from editing, because it is included in the following {{PLURAL:$1|page|pages}}, which are protected with the \"cascading\" option turned on:
 $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)",
-'protected-subtitle-edit'  => "(This page is protected. Only certain users ($1) can edit it.)",
+'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.",
 
 # Login and logout pages
 'logouttitle'                => 'User logout',
index 3dee250..4299462 100644 (file)
@@ -533,8 +533,6 @@ $2',
 'namespaceprotected'      => "אינכם מורשים לערוך דפים במרחב השם '''$1'''.",
 'customcssjsprotected'    => 'אינכם מורשים לערוך דף זה, כיוון שהוא כולל את ההגדרות האישיות של משתמש אחר.',
 'ns-specialprotected'     => 'לא ניתן לערוך דפים מיוחדים.',
-'protected-subtitle'      => '(דף זה מוגן)',
-'protected-subtitle-edit' => '(דף זה מוגן כך שרק משתמשים מסוימים ($1) יכולים לערוך אותו)',
 
 # Login and logout pages
 'logouttitle'                => 'יציאה מהחשבון',
index d33daf2..f38ba3e 100644 (file)
@@ -688,10 +688,6 @@ $2',
 'namespaceprotected'       => "'''$1''' ەسٸم اياسىنداعى بەتتەردٸ ٶڭدەۋ ٷشٸن رۇقساتىڭىز جوق.",
 'customcssjsprotected'     => 'بۇل بەتتٸ ٶڭدەۋگە رۇقساتىڭىز جوق, سەبەبٸ مىندا باسقا قاتىسۋشىنىڭ جەكە باپتاۋلارى بار.',
 'ns-specialprotected'      => '{{ns:special}} ەسٸم اياسىنداعى بەتتەر ٶڭدەلٸنبەيدٸ',
-'protected-subtitle'       => '(بۇل بەت قورعالعان)',
-'protected-subtitle-same'  => '(بۇل بەت قورعالعان. كەيبٸر پايدالانۋشىلار ($1) ٵلٸ دە بۇنى ٶڭدەي نە جىلجىتا الادى.)',
-'protected-subtitle-each'  => '(بۇل بەت قورعالعان. كەيبٸر پايدالانۋشىلار ($1) ٵلٸ دە بۇنى ٶڭدەي الادى جٵنە باسقالار ($2) بۇنى جىلجىتا الادى.)',
-'protected-anyone'         => 'ٵركٸم',
 
 # Login and logout pages
 'logouttitle'                => 'قاتىسۋشى شىعۋى',
index 4c75e90..fb3c4ab 100644 (file)
@@ -680,10 +680,6 @@ $2',
 'namespaceprotected'       => "'''$1''' есім аясындағы беттерді өңдеу үшін рұқсатыңыз жоқ.",
 'customcssjsprotected'     => 'Бұл бетті өңдеуге рұқсатыңыз жоқ, себебі мында басқа қатысушының жеке баптаулары бар.',
 'ns-specialprotected'      => '{{ns:special}} есім аясындағы беттер өңделінбейді',
-'protected-subtitle'       => '(Бұл бет қорғалған)',
-'protected-subtitle-same'  => '(Бұл бет қорғалған. Кейбір пайдаланушылар ($1) әлі де бұны өңдей не жылжыта алады.)',
-'protected-subtitle-each'  => '(Бұл бет қорғалған. Кейбір пайдаланушылар ($1) әлі де бұны өңдей алады және басқалар ($2) бұны жылжыта алады.)',
-'protected-anyone'         => 'әркім',
 
 # Login and logout pages
 'logouttitle'                => 'Қатысушы шығуы',
index a842c17..fad2341 100644 (file)
@@ -681,10 +681,6 @@ $2',
 'namespaceprotected'       => "'''$1''' esim ayasındağı betterdi öñdew üşin ruqsatıñız joq.",
 'customcssjsprotected'     => 'Bul betti öñdewge ruqsatıñız joq, sebebi mında basqa qatıswşınıñ jeke baptawları bar.',
 'ns-specialprotected'      => '{{ns:special}} esim ayasındağı better öñdelinbeýdi',
-'protected-subtitle'       => '(Bul bet qorğalğan)',
-'protected-subtitle-same'  => '(Bul bet qorğalğan. Keýbir paýdalanwşılar ($1) äli de bunı öñdeý ne jıljıta aladı.)',
-'protected-subtitle-each'  => '(Bul bet qorğalğan. Keýbir paýdalanwşılar ($1) äli de bunı öñdeý aladı jäne basqalar ($2) bunı jıljıta aladı.)',
-'protected-anyone'         => 'ärkim',
 
 # Login and logout pages
 'logouttitle'                => 'Qatıswşı şığwı',
index 4ba8df3..7ecd463 100644 (file)
@@ -330,7 +330,9 @@ $wgMessageStructure = array(
                'customcssjsprotected',
                'ns-specialprotected',
                'protected-subtitle',
-               'protected-subtitle-edit',
+               'protected-subtitle-same',
+               'protected-subtitle-each',
+               'protected-anyone',
        ),
        'login' => array(
                'logouttitle',