r20781 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20780‎ | r20781 | r20782 >
Date:18:10, 28 March 2007
Author:brion
Status:old
Tags:
Comment:
revert r20430; seems to have been tied into a reverted branch merge, uses config var that's not present
Modified paths:
  • /trunk/phase3/includes/SpecialSpecialpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialSpecialpages.php
@@ -14,10 +14,10 @@
1515 $sk = $wgUser->getSkin();
1616
1717 /** Pages available to all */
18 - wfSpecialSpecialpages_gen( SpecialPage::getRegularPages(), 'spheading', $sk, false );
 18+ wfSpecialSpecialpages_gen( SpecialPage::getRegularPages(), 'spheading', $sk );
1919
2020 /** Restricted special pages */
21 - wfSpecialSpecialpages_gen( SpecialPage::getRestrictedPages(), 'restrictedpheading', $sk, true );
 21+ wfSpecialSpecialpages_gen( SpecialPage::getRestrictedPages(), 'restrictedpheading', $sk );
2222 }
2323
2424 /**
@@ -25,10 +25,9 @@
2626 * @param $pages the list of pages
2727 * @param $heading header to be used
2828 * @param $sk skin object ???
29 - * @param $restricted, restricted pages or not
3029 */
31 -function wfSpecialSpecialpages_gen($pages,$heading,$sk,$restricted) {
32 - global $wgOut, $wgUser, $wgSortSpecialPages, $wgLogRestrictions, $wgLogNames;
 30+function wfSpecialSpecialpages_gen($pages,$heading,$sk) {
 31+ global $wgOut, $wgSortSpecialPages;
3332
3433 if( count( $pages ) == 0 ) {
3534 # Yeah, that was pointless. Thanks for coming.
@@ -42,17 +41,6 @@
4342 $sortedPages[$page->getDescription()] = $page->getTitle();
4443 }
4544 }
46 -
47 - # Add private logs
48 - if ( $restricted && isset($wgLogRestrictions) ) {
49 - foreach ( $wgLogRestrictions as $type => $restriction ) {
50 - $page = SpecialPage::getTitleFor( 'Log', $type );
51 - if ( $restriction != '' && $wgUser->isAllowed( $restriction ) ) {
52 - $name = wfMsgHtml( $wgLogNames[$type] );
53 - $sortedPages[$name] = $page;
54 - }
55 - }
56 - }
5745
5846 /** Sort */
5947 if ( $wgSortSpecialPages ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r20430*List restricted logs if $wgLogRestrictions is setaaron01:55, 14 March 2007