Index: trunk/extensions/AdminLinks/AdminLinks_body.php |
— | — | @@ -6,20 +6,12 @@ |
7 | 7 | */ |
8 | 8 | |
9 | 9 | class AdminLinks extends SpecialPage { |
10 | | - var $skin; |
11 | 10 | |
12 | 11 | /** |
13 | 12 | * Constructor |
14 | 13 | */ |
15 | 14 | function __construct() { |
16 | 15 | parent::__construct( 'AdminLinks' ); |
17 | | - // deprecated in MW 1.16 |
18 | | - global $wgVersion; |
19 | | - if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
20 | | - wfLoadExtensionMessages( 'AdminLinks' ); |
21 | | - } |
22 | | - global $wgUser; |
23 | | - $this->skin = $wgUser->getSkin(); |
24 | 16 | } |
25 | 17 | |
26 | 18 | function createInitialTree() { |
— | — | @@ -97,12 +89,6 @@ |
98 | 90 | global $wgUser; |
99 | 91 | // if user is a sysop, add link |
100 | 92 | if ( $wgUser->isAllowed( 'adminlinks' ) ) { |
101 | | - // deprecated in MW 1.16 |
102 | | - global $wgVersion; |
103 | | - if ( version_compare( $wgVersion, '1.16', '<' ) ) { |
104 | | - wfLoadExtensionMessages( 'AdminLinks' ); |
105 | | - } |
106 | | - |
107 | 93 | $al = SpecialPage::getTitleFor( 'AdminLinks' ); |
108 | 94 | $href = $al->getLocalURL(); |
109 | 95 | $admin_links_vals = array( |
— | — | @@ -271,12 +257,7 @@ |
272 | 258 | $item->label = $desc; |
273 | 259 | if ( $params != null ) { |
274 | 260 | global $wgUser; |
275 | | - // linkKnown() method was added in MW 1.16 |
276 | | - if ( method_exists( $wgUser->getSkin(), 'linkKnown' ) ) { |
277 | | - $item->text = $wgUser->getSkin()->linkKnown( $page_name, $desc, array(), $params ); |
278 | | - } else { |
279 | | - $item->text = $wgUser->getSkin()->makeKnownLinkObj( $page_name, $desc, wfArrayToCGI( $params ) ); |
280 | | - } |
| 261 | + $item->text = $wgUser->getSkin()->linkKnown( $page_name, $desc, array(), $params ); |
281 | 262 | } else |
282 | 263 | $item->text = "[[$page_name|$desc]]"; |
283 | 264 | return $item; |
— | — | @@ -287,12 +268,7 @@ |
288 | 269 | $item->label = $page_name; |
289 | 270 | $page = SpecialPage::getPage( $page_name ); |
290 | 271 | global $wgUser; |
291 | | - // linkKnown() method was added in MW 1.16 |
292 | | - if ( method_exists( $wgUser->getSkin(), 'linkKnown' ) ) { |
293 | | - $item->text = $wgUser->getSkin()->linkKnown( $page->getTitle(), $page->getDescription() ); |
294 | | - } else { |
295 | | - $item->text = $wgUser->getSkin()->makeKnownLinkObj( $page->getTitle(), $page->getDescription() ); |
296 | | - } |
| 272 | + $item->text = $wgUser->getSkin()->linkKnown( $page->getTitle(), $page->getDescription() ); |
297 | 273 | return $item; |
298 | 274 | } |
299 | 275 | |
Index: trunk/extensions/AdminLinks/README |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | |
27 | 27 | == Requirements == |
28 | 28 | |
29 | | -This version of the Admin Links extension requires MediaWiki 1.8 or higher. |
| 29 | +This version of the Admin Links extension requires MediaWiki 1.16 or higher. |
30 | 30 | |
31 | 31 | == Installation == |
32 | 32 | |