r71776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71775‎ | r71776 | r71777 >
Date:00:53, 27 August 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added call to add link to 'DeleteBatch' in 'AdminLinks' page - I hope that's okay
Modified paths:
  • /trunk/extensions/DeleteBatch/DeleteBatch.body.php (modified) (history)
  • /trunk/extensions/DeleteBatch/DeleteBatch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DeleteBatch/DeleteBatch.body.php
@@ -50,6 +50,21 @@
5151 $cSF->showForm();
5252 }
5353 }
 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+ }
5469 }
5570
5671 /* the form for deleting pages */
Index: trunk/extensions/DeleteBatch/DeleteBatch.php
@@ -34,3 +34,6 @@
3535 $wgSpecialPages['DeleteBatch'] = 'DeleteBatch';
3636 // Special page group for MW 1.13+
3737 $wgSpecialPageGroups['DeleteBatch'] = 'pagetools';
 38+
 39+// Hooks
 40+$wgHooks['AdminLinks'][] = 'DeleteBatch::addToAdminLinks'; // Admin Links extension

Status & tagging log