aboutsummaryrefslogtreecommitdiffstats
path: root/admin/photos_add.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-07-23 11:50:41 +0000
committermistic100 <mistic@piwigo.org>2012-07-23 11:50:41 +0000
commit9a4a9d846e6bd74a61d1ab390ea4deb3224f4170 (patch)
treed3a40b94d272493fa02cf78434509d678c49ef91 /admin/photos_add.php
parent7b181f067bd2a02e118e57b4c2fc44e2319ca734 (diff)
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/trunk@16928 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/photos_add.php40
1 files changed, 2 insertions, 38 deletions
diff --git a/admin/photos_add.php b/admin/photos_add.php
index 92fd6b0bb..fbc7deeab 100644
--- a/admin/photos_add.php
+++ b/admin/photos_add.php
@@ -49,53 +49,17 @@ $upload_form_config = get_upload_form_config();
// +-----------------------------------------------------------------------+
// | Tabs |
// +-----------------------------------------------------------------------+
-
-$tabs = array(
- array(
- 'code' => 'direct',
- 'label' => l10n('Web Form'),
- ),
- array(
- 'code' => 'applications',
- 'label' => l10n('Applications'),
- ),
- );
-
-if ($conf['enable_synchronization'])
-{
- array_push(
- $tabs,
- array(
- 'code' => 'ftp',
- 'label' => l10n('FTP + Synchronization'),
- )
- );
-}
-
-$tab_codes = array_map(
- create_function('$a', 'return $a["code"];'),
- $tabs
- );
-
-if (isset($_GET['section']) and in_array($_GET['section'], $tab_codes))
+if (isset($_GET['section']))
{
$page['tab'] = $_GET['section'];
}
else
{
- $page['tab'] = $tabs[0]['code'];
+ $page['tab'] = 'direct';
}
$tabsheet = new tabsheet();
$tabsheet->set_id('photos_add');
-foreach ($tabs as $tab)
-{
- $tabsheet->add(
- $tab['code'],
- $tab['label'],
- PHOTOS_ADD_BASE_URL.'&amp;section='.$tab['code']
- );
-}
$tabsheet->select($page['tab']);
$tabsheet->assign();