Index: trunk/phase3/includes/specials/SpecialLog.php |
— | — | @@ -35,6 +35,8 @@ |
36 | 36 | } |
37 | 37 | |
38 | 38 | public function execute( $par ) { |
| 39 | + global $wgLogRestrictions; |
| 40 | + |
39 | 41 | $this->setHeaders(); |
40 | 42 | $this->outputHeader(); |
41 | 43 | |
— | — | @@ -62,7 +64,13 @@ |
63 | 65 | $opts->setValue( 'month', '' ); |
64 | 66 | } |
65 | 67 | |
66 | | - if ( !LogPage::isLogType( $opts->getValue( 'type' ) ) ) { |
| 68 | + // Reset the log type to default (nothing) if it's invalid or if the |
| 69 | + // user does not possess the right to view it |
| 70 | + $type = $opts->getValue( 'type' ); |
| 71 | + if ( !LogPage::isLogType( $type ) |
| 72 | + || ( isset( $wgLogRestrictions[$type] ) |
| 73 | + && !$this->getUser()->isAllowed( $wgLogRestrictions[$type] ) ) |
| 74 | + ) { |
67 | 75 | $opts->setValue( 'type', '' ); |
68 | 76 | } |
69 | 77 | |