diff options
author | mistic100 <mistic@piwigo.org> | 2012-07-23 11:52:18 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2012-07-23 11:52:18 +0000 |
commit | 18bf888d16ed366ac7a2aa417442bc4f3be9d92d (patch) | |
tree | 42f4f4ab774a9b3848b315570b0b6a15cea7d4ad /admin/photos_add.php | |
parent | 798de81516100c4037949c7e73c4c5af1915a088 (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/photos_add.php')
-rw-r--r-- | admin/photos_add.php | 40 |
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.'&section='.$tab['code'] - ); -} $tabsheet->select($page['tab']); $tabsheet->assign(); |