Index: trunk/extensions/AdminLinks/AdminLinks_body.php |
— | — | @@ -42,7 +42,8 @@ |
43 | 43 | $main_row->addItem( ALItem::newFromSpecialPage( 'Listusers' ) ); |
44 | 44 | $ul = SpecialPage::getTitleFor( 'Userlogin' ); |
45 | 45 | $al = SpecialPage::getTitleFor( 'AdminLinks' ); |
46 | | - $main_row->addItem( AlItem::newFromPage( $ul, wfMsg( 'adminlinks_createuser' ), "type=signup&returnto=$al" ) ); |
| 46 | + $main_row->addItem( AlItem::newFromPage( $ul, wfMsg( 'adminlinks_createuser' ), |
| 47 | + array( 'type' => 'signup', 'returnto' => $al->getPrefixedText() ) ) ); |
47 | 48 | $main_row->addItem( ALItem::newFromSpecialPage( 'Userrights' ) ); |
48 | 49 | $users_section->addRow( $main_row ); |
49 | 50 | $tree->addSection( $users_section ); |
— | — | @@ -51,6 +52,7 @@ |
52 | 53 | $browse_search_section = new ALSection( wfMsg( 'adminlinks_browsesearch' ) ); |
53 | 54 | $main_row = new ALRow( 'main' ); |
54 | 55 | $main_row->addItem( ALItem::newFromSpecialPage( 'Allpages' ) ); |
| 56 | + $main_row->addItem( ALItem::newFromSpecialPage( 'Listfiles' ) ); |
55 | 57 | $main_row->addItem( ALItem::newFromSpecialPage( 'Search' ) ); |
56 | 58 | $browse_search_section->addRow( $main_row ); |
57 | 59 | $tree->addSection( $browse_search_section ); |
— | — | @@ -250,7 +252,12 @@ |
251 | 253 | $item->label = $desc; |
252 | 254 | if ( $params != null ) { |
253 | 255 | global $wgUser; |
254 | | - $item->text = $wgUser->getSkin()->makeKnownLinkObj( $page_name, $desc, $params ); |
| 256 | + // linkKnown() method was added in MW 1.16 |
| 257 | + if ( method_exists( $wgUser->getSkin(), 'linkKnown' ) ) { |
| 258 | + $item->text = $wgUser->getSkin()->linkKnown( $page_name, $desc, array(), $params ); |
| 259 | + } else { |
| 260 | + $item->text = $wgUser->getSkin()->makeKnownLinkObj( $page_name, $desc, wfArrayToCGI( $params ) ); |
| 261 | + } |
255 | 262 | } else |
256 | 263 | $item->text = "[[$page_name|$desc]]"; |
257 | 264 | return $item; |
— | — | @@ -261,7 +268,12 @@ |
262 | 269 | $item->label = $page_name; |
263 | 270 | $page = SpecialPage::getPage( $page_name ); |
264 | 271 | global $wgUser; |
265 | | - $item->text = $wgUser->getSkin()->makeKnownLinkObj( $page->getTitle(), $page->getDescription() ); |
| 272 | + // linkKnown() method was added in MW 1.16 |
| 273 | + if ( method_exists( $wgUser->getSkin(), 'linkKnown' ) ) { |
| 274 | + $item->text = $wgUser->getSkin()->linkKnown( $page->getTitle(), $page->getDescription() ); |
| 275 | + } else { |
| 276 | + $item->text = $wgUser->getSkin()->makeKnownLinkObj( $page->getTitle(), $page->getDescription() ); |
| 277 | + } |
266 | 278 | return $item; |
267 | 279 | } |
268 | 280 | |