Index: trunk/phase3/includes/specials/SpecialLog.php |
— | — | @@ -64,6 +64,10 @@ |
65 | 65 | $opts->setValue( 'month', '' ); |
66 | 66 | } |
67 | 67 | |
| 68 | + if ( LogPage::isLogType( $opts->getValue( 'type' ) ) ) { |
| 69 | + $opts->setValue( 'type', '' ); |
| 70 | + } |
| 71 | + |
68 | 72 | # Handle type-specific inputs |
69 | 73 | $qc = array(); |
70 | 74 | if ( $opts->getValue( 'type' ) == 'suppress' ) { |
— | — | @@ -103,8 +107,7 @@ |
104 | 108 | $opts->getValue( 'page' ), $opts->getValue( 'pattern' ), $extraConds, $opts->getValue( 'year' ), |
105 | 109 | $opts->getValue( 'month' ), $opts->getValue( 'tagfilter' ) ); |
106 | 110 | |
107 | | - # Set title and add header |
108 | | - $loglist->showHeader( $pager->getType() ); |
| 111 | + $this->addHeader( $opts->getValue( 'type' ) ); |
109 | 112 | |
110 | 113 | # Set relevant user |
111 | 114 | if ( $pager->getUser() ) { |
— | — | @@ -129,4 +132,16 @@ |
130 | 133 | $wgOut->addWikiMsg( 'logempty' ); |
131 | 134 | } |
132 | 135 | } |
| 136 | + |
| 137 | + /** |
| 138 | + * Set page title and show header for this log type |
| 139 | + * @param $type string |
| 140 | + * @since 1.19 |
| 141 | + */ |
| 142 | + protected function addHeader( $type ) { |
| 143 | + $page = new LogPage( $type ); |
| 144 | + $this->getOutput()->setPageTitle( $page->getName()->text() ); |
| 145 | + $this->getOutput()->addHTML( $page->getDescription()->parseAsBlock() ); |
| 146 | + } |
| 147 | + |
133 | 148 | } |