r77963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77962‎ | r77963 | r77964 >
Date:08:11, 7 December 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Added option to have the tab in the action section instead of the view one
Modified paths:
  • /trunk/extensions/Push/Push_Settings.php (modified) (history)
  • /trunk/extensions/Push/includes/Push_Tab.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Push/Push_Settings.php
@@ -22,3 +22,5 @@
2323
2424 $wgGroupPermissions['*']['push'] = true;
2525 $wgGroupPermissions['sysop']['pushadmin'] = true;
 26+
 27+$egPushShowTab = true;
Index: trunk/extensions/Push/includes/Push_Tab.php
@@ -42,10 +42,13 @@
4343 * MW 1.16 - will possibly be called for additional skins later
4444 */
4545 public static function displayTab2( $obj, &$links ) {
 46+ global $egPushShowTab;
 47+
4648 // The old '$content_actions' array is thankfully just a sub-array of this one
47 - $views_links = $links['views'];
 49+ $views_links = $links[$egPushShowTab ? 'views' : 'actions'];
4850 self::displayTab( $obj, $views_links );
49 - $links['views'] = $views_links;
 51+ $links[$egPushShowTab ? 'views' : 'actions'] = $views_links;
 52+
5053 return true;
5154 }
5255

Status & tagging log