Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -330,7 +330,9 @@ |
331 | 331 | 'customcssjsprotected', |
332 | 332 | 'ns-specialprotected', |
333 | 333 | 'protected-subtitle', |
334 | | - 'protected-subtitle-edit', |
| 334 | + 'protected-subtitle-same', |
| 335 | + 'protected-subtitle-each', |
| 336 | + 'protected-anyone', |
335 | 337 | ), |
336 | 338 | 'login' => array( |
337 | 339 | 'logouttitle', |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -740,11 +740,6 @@ |
741 | 741 | } |
742 | 742 | } |
743 | 743 | |
744 | | - if ( $this->mTitle->isProtected() ) { |
745 | | - $editrestr = $this->mTitle->getRestrictions('edit'); |
746 | | - $this->addProtectionNotice( $editrestr ); |
747 | | - } |
748 | | - |
749 | 744 | $outputDone = false; |
750 | 745 | wfRunHooks( 'ArticleViewHeader', array( &$this, &$outputDone, &$pcache ) ); |
751 | 746 | if ( $pcache ) { |
— | — | @@ -891,39 +886,6 @@ |
892 | 887 | wfProfileOut( __METHOD__ ); |
893 | 888 | } |
894 | 889 | |
895 | | - /* |
896 | | - * Output a notice that a page is protected. Only give details for edit |
897 | | - * restrictions. Cares only about the first permission in the arrays, which is |
898 | | - * part of a larger shitty inconsistency about requiring several permissions... |
899 | | - * @param Array $editrestr, edit restrictions |
900 | | - */ |
901 | | - function addProtectionNotice( $editrestr ) { |
902 | | - global $wgOut; |
903 | | - |
904 | | - if( empty($editrestr) ) |
905 | | - return; |
906 | | - |
907 | | - $permission = $editrestr[0]; |
908 | | - $permission = ($permission=='sysop') ? 'protect' : $permission; |
909 | | - |
910 | | - $editGroups = ''; |
911 | | - # Get groups that have each right |
912 | | - if( $permission ) { |
913 | | - $editGroups = $wgOut->getGroupsWithPermission( $permission ); |
914 | | - $editGroups = implode( ', ', $editGroups ); |
915 | | - } |
916 | | - # Use general messages if no groups found for a type |
917 | | - if( !$editGroups ) { |
918 | | - $msg = wfMsgExt( 'protected-subtitle', array('parsemag'), $editrestr ); |
919 | | - } else { |
920 | | - $msg = wfMsgExt( 'protected-subtitle-edit', array('parsemag'), $editGroups, $editrestr ); |
921 | | - } |
922 | | - if( $wgOut->getSubtitle() ) |
923 | | - $msg = " $msg"; |
924 | | - |
925 | | - $wgOut->setSubtitle( $wgOut->getSubtitle() . $msg ); |
926 | | - } |
927 | | - |
928 | 890 | function addTrackbacks() { |
929 | 891 | global $wgOut, $wgUser; |
930 | 892 | |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -878,7 +878,7 @@ |
879 | 879 | * @param string $permission key required |
880 | 880 | */ |
881 | 881 | public function permissionRequired( $permission ) { |
882 | | - global $wgUser; |
| 882 | + global $wgGroupPermissions, $wgUser; |
883 | 883 | |
884 | 884 | $this->setPageTitle( wfMsg( 'badaccess' ) ); |
885 | 885 | $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) ); |
— | — | @@ -886,7 +886,19 @@ |
887 | 887 | $this->setArticleRelated( false ); |
888 | 888 | $this->mBodytext = ''; |
889 | 889 | |
890 | | - $groups = $this->getGroupsWithPermission( $permission ); |
| 890 | + $groups = array(); |
| 891 | + foreach( $wgGroupPermissions as $key => $value ) { |
| 892 | + if( isset( $value[$permission] ) && $value[$permission] == true ) { |
| 893 | + $groupName = User::getGroupName( $key ); |
| 894 | + $groupPage = User::getGroupPage( $key ); |
| 895 | + if( $groupPage ) { |
| 896 | + $skin = $wgUser->getSkin(); |
| 897 | + $groups[] = $skin->makeLinkObj( $groupPage, $groupName ); |
| 898 | + } else { |
| 899 | + $groups[] = $groupName; |
| 900 | + } |
| 901 | + } |
| 902 | + } |
891 | 903 | $n = count( $groups ); |
892 | 904 | $groups = implode( ', ', $groups ); |
893 | 905 | switch( $n ) { |
— | — | @@ -901,31 +913,7 @@ |
902 | 914 | $this->addHtml( $message ); |
903 | 915 | $this->returnToMain( false ); |
904 | 916 | } |
905 | | - |
906 | | - /** |
907 | | - * Return an array of the groups in (UI name form) that have a permission |
908 | | - * |
909 | | - * @param string $permission key required |
910 | | - */ |
911 | | - public function getGroupsWithPermission( $permission ) { |
912 | | - global $wgUser, $wgGroupPermissions; |
913 | 917 | |
914 | | - $groups = array(); |
915 | | - foreach( $wgGroupPermissions as $key => $value ) { |
916 | | - if( isset( $value[$permission] ) && $value[$permission] == true ) { |
917 | | - $groupName = User::getGroupName( $key ); |
918 | | - $groupPage = User::getGroupPage( $key ); |
919 | | - if( $groupPage ) { |
920 | | - $skin = $wgUser->getSkin(); |
921 | | - $groups[] = $skin->makeLinkObj( $groupPage, $groupName ); |
922 | | - } else { |
923 | | - $groups[] = $groupName; |
924 | | - } |
925 | | - } |
926 | | - } |
927 | | - return $groups; |
928 | | - } |
929 | | - |
930 | 918 | /** |
931 | 919 | * Use permissionRequired. |
932 | 920 | * @deprecated |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -794,11 +794,9 @@ |
795 | 795 | 'sqlhidden' => '(SQL query hidden)', |
796 | 796 | '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: |
797 | 797 | $2", |
798 | | -'namespaceprotected' => "You do not have permission to edit pages in the '''$1''' namespace.", |
799 | | -'customcssjsprotected' => "You do not have permission to edit this page, because it contains another user's personal settings.", |
800 | | -'ns-specialprotected' => "Pages in the {{ns:special}} namespace cannot be edited.", |
801 | | -'protected-subtitle' => "(This page is protected)", |
802 | | -'protected-subtitle-edit' => "(This page is protected. Only certain users ($1) can edit it.)", |
| 798 | +'namespaceprotected' => "You do not have permission to edit pages in the '''$1''' namespace.", |
| 799 | +'customcssjsprotected' => "You do not have permission to edit this page, because it contains another user's personal settings.", |
| 800 | +'ns-specialprotected' => "Pages in the {{ns:special}} namespace cannot be edited.", |
803 | 801 | |
804 | 802 | # Login and logout pages |
805 | 803 | 'logouttitle' => 'User logout', |
Index: trunk/phase3/languages/messages/MessagesHe.php |
— | — | @@ -533,8 +533,6 @@ |
534 | 534 | 'namespaceprotected' => "אינכם מורשים לערוך דפים במרחב השם '''$1'''.", |
535 | 535 | 'customcssjsprotected' => 'אינכם מורשים לערוך דף זה, כיוון שהוא כולל את ההגדרות האישיות של משתמש אחר.', |
536 | 536 | 'ns-specialprotected' => 'לא ניתן לערוך דפים מיוחדים.', |
537 | | -'protected-subtitle' => '(דף זה מוגן)', |
538 | | -'protected-subtitle-edit' => '(דף זה מוגן כך שרק משתמשים מסוימים ($1) יכולים לערוך אותו)', |
539 | 537 | |
540 | 538 | # Login and logout pages |
541 | 539 | 'logouttitle' => 'יציאה מהחשבון', |
Index: trunk/phase3/languages/messages/MessagesKk_tr.php |
— | — | @@ -681,10 +681,6 @@ |
682 | 682 | 'namespaceprotected' => "'''$1''' esim ayasındağı betterdi öñdew üşin ruqsatıñız joq.", |
683 | 683 | 'customcssjsprotected' => 'Bul betti öñdewge ruqsatıñız joq, sebebi mında basqa qatıswşınıñ jeke baptawları bar.', |
684 | 684 | 'ns-specialprotected' => '{{ns:special}} esim ayasındağı better öñdelinbeýdi', |
685 | | -'protected-subtitle' => '(Bul bet qorğalğan)', |
686 | | -'protected-subtitle-same' => '(Bul bet qorğalğan. Keýbir paýdalanwşılar ($1) äli de bunı öñdeý ne jıljıta aladı.)', |
687 | | -'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ı.)', |
688 | | -'protected-anyone' => 'ärkim', |
689 | 685 | |
690 | 686 | # Login and logout pages |
691 | 687 | 'logouttitle' => 'Qatıswşı şığwı', |
Index: trunk/phase3/languages/messages/MessagesKk_cn.php |
— | — | @@ -688,10 +688,6 @@ |
689 | 689 | 'namespaceprotected' => "'''$1''' ەسٸم اياسىنداعى بەتتەردٸ ٶڭدەۋ ٷشٸن رۇقساتىڭىز جوق.", |
690 | 690 | 'customcssjsprotected' => 'بۇل بەتتٸ ٶڭدەۋگە رۇقساتىڭىز جوق, سەبەبٸ مىندا باسقا قاتىسۋشىنىڭ جەكە باپتاۋلارى بار.', |
691 | 691 | 'ns-specialprotected' => '{{ns:special}} ەسٸم اياسىنداعى بەتتەر ٶڭدەلٸنبەيدٸ', |
692 | | -'protected-subtitle' => '(بۇل بەت قورعالعان)', |
693 | | -'protected-subtitle-same' => '(بۇل بەت قورعالعان. كەيبٸر پايدالانۋشىلار ($1) ٵلٸ دە بۇنى ٶڭدەي نە جىلجىتا الادى.)', |
694 | | -'protected-subtitle-each' => '(بۇل بەت قورعالعان. كەيبٸر پايدالانۋشىلار ($1) ٵلٸ دە بۇنى ٶڭدەي الادى جٵنە باسقالار ($2) بۇنى جىلجىتا الادى.)', |
695 | | -'protected-anyone' => 'ٵركٸم', |
696 | 692 | |
697 | 693 | # Login and logout pages |
698 | 694 | 'logouttitle' => 'قاتىسۋشى شىعۋى', |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -487,10 +487,6 @@ |
488 | 488 | 'namespaceprotected' => "Du hast keine Berechtigung, die Seite in dem '''$1'''-Namensraum zu bearbeiten.", |
489 | 489 | 'customcssjsprotected' => 'Du bist nicht berechtigt diese Seite zu bearbeiten, da sie zu den persönlichen Einstellungen eines anderen Benutzers gehört.', |
490 | 490 | 'ns-specialprotected' => 'Seiten im {{ns:special}}-Namensraum können nicht bearbeitet werden.', |
491 | | -'protected-subtitle' => '(Diese Seite ist geschützt)', |
492 | | -'protected-subtitle-same' => '(Diese Seite ist geschützt. Benutzer der Gruppe(n) „$1“ können sie weiterhin bearbeiten oder verschieben.)', |
493 | | -'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.)', |
494 | | -'protected-anyone' => 'Jeder', |
495 | 491 | |
496 | 492 | # Login and logout pages |
497 | 493 | 'logouttitle' => 'Benutzer-Abmeldung', |
Index: trunk/phase3/languages/messages/MessagesKk_kz.php |
— | — | @@ -680,10 +680,6 @@ |
681 | 681 | 'namespaceprotected' => "'''$1''' есім аясындағы беттерді өңдеу үшін рұқсатыңыз жоқ.", |
682 | 682 | 'customcssjsprotected' => 'Бұл бетті өңдеуге рұқсатыңыз жоқ, себебі мында басқа қатысушының жеке баптаулары бар.', |
683 | 683 | 'ns-specialprotected' => '{{ns:special}} есім аясындағы беттер өңделінбейді', |
684 | | -'protected-subtitle' => '(Бұл бет қорғалған)', |
685 | | -'protected-subtitle-same' => '(Бұл бет қорғалған. Кейбір пайдаланушылар ($1) әлі де бұны өңдей не жылжыта алады.)', |
686 | | -'protected-subtitle-each' => '(Бұл бет қорғалған. Кейбір пайдаланушылар ($1) әлі де бұны өңдей алады және басқалар ($2) бұны жылжыта алады.)', |
687 | | -'protected-anyone' => 'әркім', |
688 | 684 | |
689 | 685 | # Login and logout pages |
690 | 686 | 'logouttitle' => 'Қатысушы шығуы', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -190,8 +190,6 @@ |
191 | 191 | * Add accesskey 's' and tooltip to 'upload file' button at Special:Upload |
192 | 192 | * Introduced 'SkinAfterBottomScripts' hook; see docs/hooks.txt for |
193 | 193 | more information |
194 | | -* (bug 10347) Give notice when a page is viewed that is protected. Does not |
195 | | - show for cascade protection however. |
196 | 194 | |
197 | 195 | == Bugfixes since 1.10 == |
198 | 196 | |
— | — | @@ -414,8 +412,6 @@ |
415 | 413 | * Resizing transparent GIF images with GD now retains transparency by skipping |
416 | 414 | resampling |
417 | 415 | * (bug 11065) Fix regression in handling of wiki-formatted EXIF metadata |
418 | | -* (bug 10347) Add subtitle message to indicate that the page being viewed is |
419 | | - protected. |
420 | 416 | * Double encoding broke Special:Newpages for some languages |
421 | 417 | * Adding a newline before the statistics footer, to prevent parsing problems |
422 | 418 | * Preventing the TOC from appearing in Special:Statistics |