Index: trunk/extensions/DeleteBatch/DeleteBatch.body.php |
— | — | @@ -50,6 +50,21 @@ |
51 | 51 | $cSF->showForm(); |
52 | 52 | } |
53 | 53 | } |
| 54 | + |
| 55 | + /** |
| 56 | + * Adds a link to Special:DeleteBatch within the page |
| 57 | + * Special:AdminLinks, if the 'AdminLinks' extension is defined |
| 58 | + */ |
| 59 | + static function addToAdminLinks( &$admin_links_tree ) { |
| 60 | + $general_section = $admin_links_tree->getSection( wfMsg( 'adminlinks_general' ) ); |
| 61 | + $extensions_row = $general_section->getRow( 'extensions' ); |
| 62 | + if ( is_null( $extensions_row ) ) { |
| 63 | + $extensions_row = new ALRow( 'extensions' ); |
| 64 | + $general_section->addRow( $extensions_row ); |
| 65 | + } |
| 66 | + $extensions_row->addItem( ALItem::newFromSpecialPage( 'DeleteBatch' ) ); |
| 67 | + return true; |
| 68 | + } |
54 | 69 | } |
55 | 70 | |
56 | 71 | /* the form for deleting pages */ |
Index: trunk/extensions/DeleteBatch/DeleteBatch.php |
— | — | @@ -34,3 +34,6 @@ |
35 | 35 | $wgSpecialPages['DeleteBatch'] = 'DeleteBatch'; |
36 | 36 | // Special page group for MW 1.13+ |
37 | 37 | $wgSpecialPageGroups['DeleteBatch'] = 'pagetools'; |
| 38 | + |
| 39 | +// Hooks |
| 40 | +$wgHooks['AdminLinks'][] = 'DeleteBatch::addToAdminLinks'; // Admin Links extension |