http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71776
Revision: 71776
Author: yaron
Date: 2010-08-27 00:53:22 +0000 (Fri, 27 Aug 2010)
Log Message:
-----------
Added call to add link to 'DeleteBatch' in 'AdminLinks' page - I hope that's
okay
Modified Paths:
--------------
trunk/extensions/DeleteBatch/DeleteBatch.body.php
trunk/extensions/DeleteBatch/DeleteBatch.php
Modified: trunk/extensions/DeleteBatch/DeleteBatch.body.php
===================================================================
--- trunk/extensions/DeleteBatch/DeleteBatch.body.php 2010-08-27 00:19:34 UTC
(rev 71775)
+++ trunk/extensions/DeleteBatch/DeleteBatch.body.php 2010-08-27 00:53:22 UTC
(rev 71776)
@@ -50,6 +50,21 @@
$cSF->showForm();
}
}
+
+ /**
+ * Adds a link to Special:DeleteBatch within the page
+ * Special:AdminLinks, if the 'AdminLinks' extension is defined
+ */
+ static function addToAdminLinks( &$admin_links_tree ) {
+ $general_section = $admin_links_tree->getSection( wfMsg(
'adminlinks_general' ) );
+ $extensions_row = $general_section->getRow( 'extensions' );
+ if ( is_null( $extensions_row ) ) {
+ $extensions_row = new ALRow( 'extensions' );
+ $general_section->addRow( $extensions_row );
+ }
+ $extensions_row->addItem( ALItem::newFromSpecialPage(
'DeleteBatch' ) );
+ return true;
+ }
}
/* the form for deleting pages */
Modified: trunk/extensions/DeleteBatch/DeleteBatch.php
===================================================================
--- trunk/extensions/DeleteBatch/DeleteBatch.php 2010-08-27 00:19:34 UTC
(rev 71775)
+++ trunk/extensions/DeleteBatch/DeleteBatch.php 2010-08-27 00:53:22 UTC
(rev 71776)
@@ -34,3 +34,6 @@
$wgSpecialPages['DeleteBatch'] = 'DeleteBatch';
// Special page group for MW 1.13+
$wgSpecialPageGroups['DeleteBatch'] = 'pagetools';
+
+// Hooks
+$wgHooks['AdminLinks'][] = 'DeleteBatch::addToAdminLinks'; // Admin Links
extension
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs