aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--admin.php1
-rw-r--r--admin/album.php4
-rw-r--r--admin/batch_manager.php40
-rw-r--r--admin/cat_options.php14
-rw-r--r--admin/comments.php1
-rw-r--r--admin/configuration.php9
-rw-r--r--admin/help.php44
-rw-r--r--admin/include/add_core_tabs.inc.php147
-rw-r--r--admin/include/albums_tab.inc.php5
-rw-r--r--admin/include/functions_history.inc.php5
-rw-r--r--admin/include/tabsheet.class.php5
-rw-r--r--admin/languages.php6
-rw-r--r--admin/notification_by_mail.php12
-rw-r--r--admin/photo.php3
-rw-r--r--admin/photos_add.php40
-rw-r--r--admin/plugins.php3
-rw-r--r--admin/rating.php2
-rw-r--r--admin/rating_user.php2
-rw-r--r--admin/themes.php3
-rw-r--r--admin/updates.php4
20 files changed, 170 insertions, 180 deletions
diff --git a/admin.php b/admin.php
index 7282f1096..2a9f4cdd1 100644
--- a/admin.php
+++ b/admin.php
@@ -31,6 +31,7 @@ define('IN_ADMIN', true);
include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');
+include_once(PHPWG_ROOT_PATH.'admin/include/add_core_tabs.inc.php');
trigger_action('loc_begin_admin');
diff --git a/admin/album.php b/admin/album.php
index 289be09ee..8115d2e5c 100644
--- a/admin/album.php
+++ b/admin/album.php
@@ -63,10 +63,6 @@ if (isset($_GET['tab']))
$tabsheet = new tabsheet();
$tabsheet->set_id('album');
-$tabsheet->add('properties', l10n('Properties'), $admin_album_base_url.'-properties');
-$tabsheet->add('sort_order', l10n('Manage photo ranks'), $admin_album_base_url.'-sort_order');
-$tabsheet->add('permissions', l10n('Permissions'), $admin_album_base_url.'-permissions');
-$tabsheet->add('notification', l10n('Notification'), $admin_album_base_url.'-notification');
$tabsheet->select($page['tab']);
$tabsheet->assign();
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
diff --git a/admin/cat_options.php b/admin/cat_options.php
index aa871c309..18542d1f9 100644
--- a/admin/cat_options.php
+++ b/admin/cat_options.php
@@ -139,21 +139,7 @@ $template->assign(
// TabSheet
$tabsheet = new tabsheet();
$tabsheet->set_id('cat_options');
-// TabSheet initialization
-$opt_link = $link_start.'cat_options&amp;section=';
-$tabsheet->add('status', l10n('Public / Private'), $opt_link.'status');
-$tabsheet->add('visible', l10n('Lock'), $opt_link.'visible');
-if ($conf['activate_comments'])
-{
- $tabsheet->add('comments', l10n('Comments'), $opt_link.'comments');
-}
-if ($conf['allow_random_representative'])
-{
- $tabsheet->add('representative', l10n('Representative'), $opt_link.'representative');
-}
-// TabSheet selection
$tabsheet->select($page['section']);
-// Assign tabsheet to template
$tabsheet->assign();
// +-----------------------------------------------------------------------+
diff --git a/admin/comments.php b/admin/comments.php
index 9b330ac8b..c36e42202 100644
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -99,7 +99,6 @@ include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
$tabsheet = new tabsheet();
$tabsheet->set_id('comments');
-$tabsheet->add('', l10n('User comments validation'), '');
$tabsheet->select('');
$tabsheet->assign();
diff --git a/admin/configuration.php b/admin/configuration.php
index aa27cc5f3..e4e881051 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -287,16 +287,7 @@ $template->set_filename('config', 'configuration.tpl');
// TabSheet
$tabsheet = new tabsheet();
$tabsheet->set_id('configuration');
-// TabSheet initialization
-$tabsheet->add('main', l10n('Main'), $conf_link.'main');
-$tabsheet->add('sizes', l10n('Photo sizes'), $conf_link.'sizes');
-$tabsheet->add('watermark', l10n('Watermark'), $conf_link.'watermark');
-$tabsheet->add('display', l10n('Display'), $conf_link.'display');
-$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
-$tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default');
-// TabSheet selection
$tabsheet->select($page['section']);
-// Assign tabsheet to template
$tabsheet->assign();
$action = get_root_url().'admin.php?page=configuration';
diff --git a/admin/help.php b/admin/help.php
index ec4a1fc45..e47740ca9 100644
--- a/admin/help.php
+++ b/admin/help.php
@@ -29,54 +29,20 @@ include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);
-$link = get_root_url().'admin.php?page=help&section=';
+$help_link = get_root_url().'admin.php?page=help&section=';
$selected = null;
-$help_section_title = null;
-
-$tabs = array();
-$tabs[] = array(
- 'code' => 'add_photos',
- 'label' => l10n('Add Photos'),
- );
-$tabs[] = array(
- 'code' => 'permissions',
- 'label' => l10n('Permissions'),
- );
-$tabs[] = array(
- 'code' => 'groups',
- 'label' => l10n('Groups'),
- );
-$tabs[] = array(
- 'code' => 'virtual_links',
- 'label' => l10n('Virtual Links'),
- );
-$tabs[] = array(
- 'code' => 'misc',
- 'label' => l10n('Miscellaneous'),
- );
if (!isset($_GET['section']))
{
- $section = $tabs[0]['code'];
+ $selected = 'add_photos';
}
else
{
- $section = $_GET['section'];
+ $selected = $_GET['section'];
}
$tabsheet = new tabsheet();
$tabsheet->set_id('help');
-foreach ($tabs as $tab)
-{
- if ($tab['code'] == $section)
- {
- $selected_tab = $tab['code'];
- $help_section_title = $tab['label'];
- }
-
- $tabsheet->add($tab['code'], $tab['label'], $link.$tab['code']);
-}
-$tabsheet->select($selected_tab);
$tabsheet->assign();
$template->set_filenames(array('help' => 'help.tpl'));
@@ -84,11 +50,11 @@ $template->set_filenames(array('help' => 'help.tpl'));
$template->assign(
array(
'HELP_CONTENT' => load_language(
- 'help/help_'.$selected_tab.'.html',
+ 'help/help_'.$tabsheet->selected.'.html',
'',
array('return'=>true)
),
- 'HELP_SECTION_TITLE' => $help_section_title,
+ 'HELP_SECTION_TITLE' => $tabsheet->sheets[ $tabsheet->selected ]['caption'],
)
);
diff --git a/admin/include/add_core_tabs.inc.php b/admin/include/add_core_tabs.inc.php
new file mode 100644
index 000000000..7f31b9bd5
--- /dev/null
+++ b/admin/include/add_core_tabs.inc.php
@@ -0,0 +1,147 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based photo gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2012 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+add_event_handler('tabsheet_before_select', 'add_core_tabs', 0, 2);
+
+function add_core_tabs($sheets, $tab_id)
+{
+ switch($tab_id)
+ {
+ case 'album':
+ global $admin_album_base_url;
+ $sheets['properties'] = array('caption' => l10n('Properties'), 'url' => $admin_album_base_url.'-properties');
+ $sheets['sort_order'] = array('caption' => l10n('Manage photo ranks'), 'url' => $admin_album_base_url.'-sort_order');
+ $sheets['permissions'] = array('caption' => l10n('Permissions'), 'url' => $admin_album_base_url.'-permissions');
+ $sheets['notification'] = array('caption' => l10n('Notification'), 'url' => $admin_album_base_url.'-notification');
+ break;
+
+ case 'albums':
+ global $my_base_url;
+ $sheets['list'] = array('caption' => l10n('List'), 'url' => $my_base_url.'cat_list');
+ $sheets['move'] = array('caption' => l10n('Move'), 'url' => $my_base_url.'cat_move');
+ $sheets['permalinks'] = array('caption' => l10n('Permalinks'), 'url' => $my_base_url.'permalinks');
+ break;
+
+ case 'batch_manager':
+ global $manager_link;
+ $sheets['global'] = array('caption' => l10n('global mode'), 'url' => $manager_link.'global');
+ $sheets['unit'] = array('caption' => l10n('unit mode'), 'url' => $manager_link.'unit');
+ break;
+
+ case 'cat_options':
+ global $link_start, $conf;
+ $sheets['status'] = array('caption' => l10n('Public / Private'), 'url' => $link_start.'cat_options&amp;section=status');
+ $sheets['visible'] = array('caption' => l10n('Lock'), 'url' => $link_start.'cat_options&amp;section=visible');
+ if ($conf['activate_comments'])
+ $sheets['comments'] = array('caption' => l10n('Comments'), 'url' => $link_start.'cat_options&amp;section=comments');
+ if ($conf['allow_random_representative'])
+ $sheets['representative'] = array('caption' => l10n('Representative'), 'url' => $link_start.'cat_options&amp;section=representative');
+ break;
+
+ case 'comments':
+ $sheets[''] = array('caption' => l10n('User comments validation'), 'url' => '');
+ break;
+
+ case 'configuration':
+ global $conf_link;
+ $sheets['main'] = array('caption' => l10n('Main'), 'url' => $conf_link.'main');
+ $sheets['sizes'] = array('caption' => l10n('Photo sizes'), 'url' => $conf_link.'sizes');
+ $sheets['watermark'] = array('caption' => l10n('Watermark'), 'url' => $conf_link.'watermark');
+ $sheets['display'] = array('caption' => l10n('Display'), 'url' => $conf_link.'display');
+ $sheets['comments'] = array('caption' => l10n('Comments'), 'url' => $conf_link.'comments');
+ $sheets['default'] = array('caption' => l10n('Guest Settings'), 'url' => $conf_link.'default');
+ break;
+
+ case 'help':
+ global $help_link;
+ $sheets['add_photos'] = array('caption' => l10n('Add Photos'), 'url' => $help_link.'add_photos');
+ $sheets['permissions'] = array('caption' => l10n('Permissions'), 'url' => $help_link.'permissions');
+ $sheets['groups'] = array('caption' => l10n('Groups'), 'url' => $help_link.'groups');
+ $sheets['virtual_links'] = array('caption' => l10n('Virtual Links'), 'url' => $help_link.'virtual_links');
+ $sheets['misc'] = array('caption' => l10n('Miscellaneous'), 'url' => $help_link.'misc');
+ break;
+
+ case 'history':
+ global $link_start;
+ $sheets['stats'] = array('caption' => l10n('Statistics'), 'url' => $link_start.'stats');
+ $sheets['history'] = array('caption' => l10n('Search'), 'url' => $link_start.'history');
+ break;
+
+ case 'languages':
+ global $my_base_url;
+ $sheets['installed'] = array('caption' => l10n('Installed Languages'), 'url' => $my_base_url.'&amp;tab=installed');
+ $sheets['update'] = array('caption' => l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
+ $sheets['new'] = array('caption' => l10n('Add New Language'), 'url' => $my_base_url.'&amp;tab=new');
+ break;
+
+ case 'nbm':
+ global $base_url;
+ $sheets['param'] = array('caption' => l10n('Parameter'), 'url' => $base_url.'?page=notification_by_mail&amp;mode=param');
+ $sheets['subscribe'] = array('caption' => l10n('Subscribe'), 'url' => $base_url.'?page=notification_by_mail&amp;mode=subscribe');
+ $sheets['send'] = array('caption' => l10n('Send'), 'url' => $base_url.'?page=notification_by_mail&amp;mode=send');
+ break;
+
+ case 'photo':
+ global $admin_photo_base_url;
+ $sheets['properties'] = array('caption' => l10n('Properties'), 'url' => $admin_photo_base_url.'-properties');
+ $sheets['coi'] = array('caption' => l10n('Center of interest'), 'url' => $admin_photo_base_url.'-coi');
+ break;
+
+ case 'photos_add':
+ global $conf;
+ $sheets['direct'] = array('caption' => l10n('Web Form'), 'url' => PHOTOS_ADD_BASE_URL.'&amp;section=direct');
+ $sheets['applications'] = array('caption' => l10n('Applications'), 'url' => PHOTOS_ADD_BASE_URL.'&amp;section=applications');
+ if ($conf['enable_synchronization'])
+ $sheets['ftp'] = array('caption' => l10n('FTP + Synchronization'), 'url' => PHOTOS_ADD_BASE_URL.'&amp;section=ftp');
+ break;
+
+ case 'plugins':
+ global $my_base_url;
+ $sheets['installed'] = array('caption' => l10n('Plugin list'), 'url' => $my_base_url.'&amp;tab=installed');
+ $sheets['update'] = array('caption' => l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
+ $sheets['new'] = array('caption' => l10n('Other plugins'), 'url' => $my_base_url.'&amp;tab=new');
+ break;
+
+ case 'rating':
+ $sheets['rating'] = array('caption' => l10n('Photos'), 'url' => get_root_url().'admin.php?page=rating');
+ $sheets['rating_user'] = array('caption' => l10n('Users'), 'url' => get_root_url().'admin.php?page=rating_user');
+ break;
+
+ case 'themes':
+ global $my_base_url;
+ $sheets['installed'] = array('caption' => l10n('Installed Themes'), 'url' => $my_base_url.'&amp;tab=installed');
+ $sheets['update'] = array('caption' => l10n('Check for updates'), 'url' => $my_base_url.'&amp;tab=update');
+ $sheets['new'] = array('caption' => l10n('Add New Theme'), 'url' => $my_base_url.'&amp;tab=new');
+ break;
+
+ case 'updates':
+ global $my_base_url;
+ $sheets['pwg'] = array('caption' => l10n('Piwigo Update'), 'url' => $my_base_url);
+ $sheets['ext'] = array('caption' => l10n('Extensions Update'), 'url' => $my_base_url.'&amp;tab=ext');
+ break;
+ }
+
+ return $sheets;
+}
+
+?> \ No newline at end of file
diff --git a/admin/include/albums_tab.inc.php b/admin/include/albums_tab.inc.php
index 22457efd3..9f555075c 100644
--- a/admin/include/albums_tab.inc.php
+++ b/admin/include/albums_tab.inc.php
@@ -26,10 +26,7 @@ include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
$my_base_url = get_root_url().'admin.php?page=';
$tabsheet = new tabsheet();
-$tabsheet->set_id('cat_list');
-$tabsheet->add('list', l10n('List'), $my_base_url.'cat_list');
-$tabsheet->add('move', l10n('Move'), $my_base_url.'cat_move');
-$tabsheet->add('permalinks', l10n('Permalinks'), $my_base_url.'permalinks');
+$tabsheet->set_id('albums');
$tabsheet->select($page['tab']);
$tabsheet->assign();
diff --git a/admin/include/functions_history.inc.php b/admin/include/functions_history.inc.php
index 301ae6b7d..3a8aadf5e 100644
--- a/admin/include/functions_history.inc.php
+++ b/admin/include/functions_history.inc.php
@@ -30,12 +30,7 @@ function history_tabsheet()
// TabSheet
$tabsheet = new tabsheet();
$tabsheet->set_id('history');
- // TabSheet initialization
- $tabsheet->add('stats', l10n('Statistics'), $link_start.'stats');
- $tabsheet->add('history', l10n('Search'), $link_start.'history');
- // TabSheet selection
$tabsheet->select($page['page']);
- // Assign tabsheet to template
$tabsheet->assign();
}
diff --git a/admin/include/tabsheet.class.php b/admin/include/tabsheet.class.php
index 02ee9a3d1..fdeeb2afd 100644
--- a/admin/include/tabsheet.class.php
+++ b/admin/include/tabsheet.class.php
@@ -89,6 +89,11 @@ class tabsheet
function select($name)
{
$this->sheets = trigger_event('tabsheet_before_select', $this->sheets, $this->uniqid);
+ if (!array_key_exists($name, $this->sheets))
+ {
+ $keys = array_keys($this->sheets);
+ $name = $keys[0];
+ }
$this->selected = $name;
}
diff --git a/admin/languages.php b/admin/languages.php
index fd282d556..cc8057453 100644
--- a/admin/languages.php
+++ b/admin/languages.php
@@ -35,11 +35,7 @@ if (isset($_GET['tab']))
else
$page['tab'] = 'installed';
-$tabsheet = new tabsheet();
-$tabsheet->set_id('languages');
-$tabsheet->add('installed', l10n('Installed Languages'), $my_base_url.'&amp;tab=installed');
-$tabsheet->add('update', l10n('Check for updates'), $my_base_url.'&amp;tab=update');
-$tabsheet->add('new', l10n('Add New Language'), $my_base_url.'&amp;tab=new');
+$tabsheet = new tabsheet('languages');
$tabsheet->select($page['tab']);
$tabsheet->assign();
diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php
index 1db2bae32..b65989bb3 100644
--- a/admin/notification_by_mail.php
+++ b/admin/notification_by_mail.php
@@ -589,19 +589,7 @@ if (is_autorize_status(ACCESS_WEBMASTER))
// TabSheet
$tabsheet = new tabsheet();
$tabsheet->set_id('nbm');
- // TabSheet initialization
- $tabsheet->add('param', l10n('Parameter'),
- add_url_params($base_url.get_query_string_diff(array('mode', 'select')),
- array('mode' => 'param')));
- $tabsheet->add('subscribe', l10n('Subscribe'),
- add_url_params($base_url.get_query_string_diff(array('mode', 'select')),
- array('mode' => 'subscribe')));
- $tabsheet->add('send', l10n('Send'),
- add_url_params($base_url.get_query_string_diff(array('mode', 'select')),
- array('mode' => 'send')));
- // TabSheet selection
$tabsheet->select($page['mode']);
- // Assign tabsheet to template
$tabsheet->assign();
}
diff --git a/admin/photo.php b/admin/photo.php
index b016b4bcb..a2742d261 100644
--- a/admin/photo.php
+++ b/admin/photo.php
@@ -62,9 +62,6 @@ if (isset($_GET['tab']))
$tabsheet = new tabsheet();
$tabsheet->set_id('photo');
-$tabsheet->add('properties', l10n('Properties'), $admin_photo_base_url.'-properties');
-$tabsheet->add('coi', l10n('Center of interest'), $admin_photo_base_url.'-coi');
-
$tabsheet->select($page['tab']);
$tabsheet->assign();
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();
diff --git a/admin/plugins.php b/admin/plugins.php
index 9c4e1d239..4e6d65821 100644
--- a/admin/plugins.php
+++ b/admin/plugins.php
@@ -37,9 +37,6 @@ else
$tabsheet = new tabsheet();
$tabsheet->set_id('plugins');
-$tabsheet->add('installed', l10n('Plugin list'), $my_base_url.'&amp;tab=installed');
-$tabsheet->add('update', l10n('Check for updates'), $my_base_url.'&amp;tab=update');
-$tabsheet->add('new', l10n('Other plugins'), $my_base_url.'&amp;tab=new');
$tabsheet->select($page['tab']);
$tabsheet->assign();
diff --git a/admin/rating.php b/admin/rating.php
index 0f495c876..44eaa55ec 100644
--- a/admin/rating.php
+++ b/admin/rating.php
@@ -37,8 +37,6 @@ check_status(ACCESS_ADMINISTRATOR);
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
$tabsheet = new tabsheet();
$tabsheet->set_id('rating');
-$tabsheet->add('rating', l10n('Photos'), get_root_url().'admin.php?page=rating');
-$tabsheet->add('rating_user', l10n('Users'), get_root_url().'admin.php?page=rating_user');
$tabsheet->select('rating');
$tabsheet->assign();
diff --git a/admin/rating_user.php b/admin/rating_user.php
index 480ec41c4..cba290260 100644
--- a/admin/rating_user.php
+++ b/admin/rating_user.php
@@ -26,8 +26,6 @@ defined('PHPWG_ROOT_PATH') or die ("Hacking attempt!");
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
$tabsheet = new tabsheet();
$tabsheet->set_id('rating');
-$tabsheet->add('rating', l10n('Photos'), get_root_url().'admin.php?page=rating');
-$tabsheet->add('rating_user', l10n('Users'), get_root_url().'admin.php?page=rating_user');
$tabsheet->select('rating_user');
$tabsheet->assign();
diff --git a/admin/themes.php b/admin/themes.php
index 93d159dc2..a7a7278ef 100644
--- a/admin/themes.php
+++ b/admin/themes.php
@@ -37,9 +37,6 @@ else
$tabsheet = new tabsheet();
$tabsheet->set_id('themes');
-$tabsheet->add('installed', l10n('Installed Themes'), $my_base_url.'&amp;tab=installed');
-$tabsheet->add('update', l10n('Check for updates'), $my_base_url.'&amp;tab=update');
-$tabsheet->add('new', l10n('Add New Theme'), $my_base_url.'&amp;tab=new');
$tabsheet->select($page['tab']);
$tabsheet->assign();
diff --git a/admin/updates.php b/admin/updates.php
index 3a2c3609d..bb0337d47 100644
--- a/admin/updates.php
+++ b/admin/updates.php
@@ -33,10 +33,8 @@ if (isset($_GET['tab']))
else
$page['tab'] = 'pwg';
-$tabsheet = new tabsheet();
+$tabsheet = new tabsheet();
$tabsheet->set_id('updates');
-$tabsheet->add('pwg', l10n('Piwigo Update'), $my_base_url);
-$tabsheet->add('ext', l10n('Extensions Update'), $my_base_url.'&amp;tab=ext');
$tabsheet->select($page['tab']);
$tabsheet->assign();