aboutsummaryrefslogtreecommitdiffstats
path: root/admin/batch_manager.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-07-23 11:52:18 +0000
committermistic100 <mistic@piwigo.org>2012-07-23 11:52:18 +0000
commit18bf888d16ed366ac7a2aa417442bc4f3be9d92d (patch)
tree42f4f4ab774a9b3848b315570b0b6a15cea7d4ad /admin/batch_manager.php
parent798de81516100c4037949c7e73c4c5af1915a088 (diff)
Merged revision(s) 16928 from trunk:
feature 2703: make it easy for plugins to add tabs in admin screens centralize all core tabs in one file git-svn-id: http://piwigo.org/svn/branches/2.4@16929 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/batch_manager.php')
-rw-r--r--admin/batch_manager.php40
1 files changed, 7 insertions, 33 deletions
diff --git a/admin/batch_manager.php b/admin/batch_manager.php
index ddca63ed0..113d4c629 100644
--- a/admin/batch_manager.php
+++ b/admin/batch_manager.php
@@ -350,22 +350,7 @@ else
// +-----------------------------------------------------------------------+
// | Tabs |
// +-----------------------------------------------------------------------+
-
-$tabs = array(
- array(
- 'code' => 'global',
- 'label' => l10n('global mode'),
- ),
- array(
- 'code' => 'unit',
- 'label' => l10n('unit mode'),
- ),
- );
-
-$tab_codes = array_map(
- create_function('$a', 'return $a["code"];'),
- $tabs
- );
+$manager_link = get_root_url().'admin.php?page=batch_manager&amp;mode=';
if (isset($_GET['mode']))
{
@@ -373,23 +358,13 @@ if (isset($_GET['mode']))
}
else
{
- $page['tab'] = $tabs[0]['code'];
+ $page['tab'] = 'global';
}
-if (in_array($page['tab'], $tab_codes))
-{
- $tabsheet = new tabsheet();
- $tabsheet->set_id('batch_manager');
- foreach ($tabs as $tab)
- {
- $tabsheet->add(
- $tab['code'],
- $tab['label'],
- get_root_url().'admin.php?page='.$_GET['page'].'&amp;mode='.$tab['code']
- );
- }
- $tabsheet->select($page['tab']);
- $tabsheet->assign();
+$tabsheet = new tabsheet();
+$tabsheet->set_id('batch_manager');
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
// +-----------------------------------------------------------------------+
// | tags |
@@ -405,6 +380,5 @@ $template->assign('tags', get_taglist($query, false));
// | open specific mode |
// +-----------------------------------------------------------------------+
- include(PHPWG_ROOT_PATH.'admin/batch_manager_'.$page['tab'].'.php');
-}
+include(PHPWG_ROOT_PATH.'admin/batch_manager_'.$page['tab'].'.php');
?> \ No newline at end of file