Index: trunk/extensions/AbuseFilter/special/SpecialAbuseLog.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | $out = $this->getOutput(); |
27 | 27 | $request = $this->getRequest(); |
28 | 28 | |
29 | | - AbuseFilter::addNavigationLinks( $out, $this->getSkin(), 'log' ); |
| 29 | + AbuseFilter::addNavigationLinks( $this->getContext(), 'log' ); |
30 | 30 | |
31 | 31 | $this->setHeaders(); |
32 | 32 | $this->outputHeader( 'abusefilter-log-summary' ); |
Index: trunk/extensions/AbuseFilter/special/SpecialAbuseFilter.php |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | } |
97 | 97 | |
98 | 98 | // Links at the top |
99 | | - AbuseFilter::addNavigationLinks( $out, $this->getSkin(), $pageType ); |
| 99 | + AbuseFilter::addNavigationLinks( $this->getContext(), $pageType ); |
100 | 100 | |
101 | 101 | $v = new $view( $this, $params ); |
102 | 102 | $v->show(); |
Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php |
— | — | @@ -120,8 +120,7 @@ |
121 | 121 | ); |
122 | 122 | public static $editboxName = null; |
123 | 123 | |
124 | | - public static function addNavigationLinks( $out, $sk, $pageType ) { |
125 | | - global $wgLang, $wgUser; |
| 124 | + public static function addNavigationLinks( IContextSource $context, $pageType ) { |
126 | 125 | $linkDefs = array( |
127 | 126 | 'home' => 'Special:AbuseFilter', |
128 | 127 | 'recentchanges' => 'Special:AbuseFilter/history', |
— | — | @@ -130,7 +129,7 @@ |
131 | 130 | 'log' => 'Special:AbuseLog', |
132 | 131 | ); |
133 | 132 | |
134 | | - if ( $wgUser->isAllowed( 'abusefilter-modify' ) ) { |
| 133 | + if ( $context->getUser()->isAllowed( 'abusefilter-modify' ) ) { |
135 | 134 | $linkDefs = array_merge( $linkDefs, array( |
136 | 135 | 'tools' => 'Special:AbuseFilter/tools', |
137 | 136 | 'import' => 'Special:AbuseFilter/import', |
— | — | @@ -160,16 +159,16 @@ |
161 | 160 | if ( $name == $pageType ) { |
162 | 161 | $links[] = Xml::tags( 'strong', null, $msg ); |
163 | 162 | } else { |
164 | | - $links[] = $sk->link( $title, $msg ); |
| 163 | + $links[] = $context->getSkin()->link( $title, $msg ); |
165 | 164 | } |
166 | 165 | } |
167 | 166 | |
168 | | - $linkStr = wfMsg( 'parentheses', $wgLang->pipeList( $links ) ); |
| 167 | + $linkStr = wfMsg( 'parentheses', $context->getLang()->pipeList( $links ) ); |
169 | 168 | $linkStr = wfMsgExt( 'abusefilter-topnav', 'parseinline' ) . " $linkStr"; |
170 | 169 | |
171 | 170 | $linkStr = Xml::tags( 'div', array( 'class' => 'mw-abusefilter-navigation' ), $linkStr ); |
172 | 171 | |
173 | | - $out->setSubtitle( $linkStr ); |
| 172 | + $context->getOutput()->setSubtitle( $linkStr ); |
174 | 173 | } |
175 | 174 | |
176 | 175 | /** |