aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-07-07 09:15:57 +0000
committerpatdenice <patdenice@piwigo.org>2011-07-07 09:15:57 +0000
commitf90014943d7344608f519b556bc5086b41f3b14f (patch)
tree20a3404f16bb7bff29bcec0e884174e12be22d75 /plugins
parentafdbb1a191d5f4541607796e242a0147a312d5c9 (diff)
LocalFiles Editor tabs can be selected in configuration file.
git-svn-id: http://piwigo.org/svn/trunk@11655 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins')
-rw-r--r--plugins/LocalFilesEditor/admin.php32
1 files changed, 13 insertions, 19 deletions
diff --git a/plugins/LocalFilesEditor/admin.php b/plugins/LocalFilesEditor/admin.php
index a0e679378..cdb452950 100644
--- a/plugins/LocalFilesEditor/admin.php
+++ b/plugins/LocalFilesEditor/admin.php
@@ -30,27 +30,21 @@ $my_base_url = get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__
// +-----------------------------------------------------------------------+
// | Tabssheet
// +-----------------------------------------------------------------------+
-if (!isset($_GET['tab']))
- $page['tab'] = 'localconf';
-else
- $page['tab'] = $_GET['tab'];
+
+if (empty($conf['LocalFilesEditor_tabs']))
+{
+ $conf['LocalFilesEditor_tabs'] = array('localconf', 'css', 'tpl', 'lang', 'plug');
+}
+
+$page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : $conf['LocalFilesEditor_tabs'][0];
+
+if (!in_array($page['tab'], $conf['LocalFilesEditor_tabs'])) die('Hacking attempt!');
$tabsheet = new tabsheet();
-$tabsheet->add('localconf',
- l10n('locfiledit_onglet_localconf'),
- $my_base_url.'-localconf');
-$tabsheet->add('css',
- l10n('locfiledit_onglet_css'),
- $my_base_url.'-css');
-$tabsheet->add('tpl',
- l10n('locfiledit_onglet_tpl'),
- $my_base_url.'-tpl');
-$tabsheet->add('lang',
- l10n('locfiledit_onglet_lang'),
- $my_base_url.'-lang');
-$tabsheet->add('plug',
- l10n('locfiledit_onglet_plug'),
- $my_base_url.'-plug');
+foreach ($conf['LocalFilesEditor_tabs'] as $tab)
+{
+ $tabsheet->add($tab, l10n('locfiledit_onglet_'.$tab), $my_base_url.'-'.$tab);
+}
$tabsheet->select($page['tab']);
$tabsheet->assign();