Index: trunk/phase3/includes/SpecialPageFactory.php |
— | — | @@ -267,7 +267,7 @@ |
268 | 268 | */ |
269 | 269 | public static function setGroup( $page, $group ) { |
270 | 270 | global $wgSpecialPageGroups; |
271 | | - $name = is_object( $page ) ? $page->mName : $page; |
| 271 | + $name = is_object( $page ) ? $page->getName() : $page; |
272 | 272 | $wgSpecialPageGroups[$name] = $group; |
273 | 273 | } |
274 | 274 | |
— | — | @@ -277,23 +277,25 @@ |
278 | 278 | * @param $page SpecialPage |
279 | 279 | */ |
280 | 280 | public static function getGroup( &$page ) { |
| 281 | + $name = $page->getName(); |
| 282 | + |
281 | 283 | global $wgSpecialPageGroups; |
282 | 284 | static $specialPageGroupsCache = array(); |
283 | | - if ( isset( $specialPageGroupsCache[$page->mName] ) ) { |
284 | | - return $specialPageGroupsCache[$page->mName]; |
| 285 | + if ( isset( $specialPageGroupsCache[$name] ) ) { |
| 286 | + return $specialPageGroupsCache[$name]; |
285 | 287 | } |
286 | | - $msg = wfMessage( 'specialpages-specialpagegroup-' . strtolower( $page->mName ) ); |
| 288 | + $msg = wfMessage( 'specialpages-specialpagegroup-' . strtolower( $name ) ); |
287 | 289 | if ( !$msg->isBlank() ) { |
288 | 290 | $group = $msg->text(); |
289 | 291 | } else { |
290 | | - $group = isset( $wgSpecialPageGroups[$page->mName] ) |
291 | | - ? $wgSpecialPageGroups[$page->mName] |
| 292 | + $group = isset( $wgSpecialPageGroups[$name] ) |
| 293 | + ? $wgSpecialPageGroups[$name] |
292 | 294 | : '-'; |
293 | 295 | } |
294 | 296 | if ( $group == '-' ) { |
295 | 297 | $group = 'other'; |
296 | 298 | } |
297 | | - $specialPageGroupsCache[$page->mName] = $group; |
| 299 | + $specialPageGroupsCache[$name] = $group; |
298 | 300 | return $group; |
299 | 301 | } |
300 | 302 | |