aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-04-23 12:48:05 +0000
committerpatdenice <patdenice@piwigo.org>2011-04-23 12:48:05 +0000
commit790f6b3bb6e4bf888a7fdb36f87a763cdb8ca450 (patch)
tree57cce0c848c48c18e17013138509e9d0b2bbbb03 /admin/include
parentd7dfe63e113a069b05a363fa339db3cd7274ead1 (diff)
Change tabsheet place for plugins, themes and languages.
Plugins, themes and languages use same update page. git-svn-id: http://piwigo.org/svn/trunk@10594 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php10
-rw-r--r--admin/include/languages.class.php18
-rw-r--r--admin/include/plugins.class.php18
-rw-r--r--admin/include/themes.class.php18
-rw-r--r--admin/include/updates.class.php7
5 files changed, 9 insertions, 62 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 3d32e7b0e..edc09048e 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2072,9 +2072,7 @@ function get_active_menu($menu_page)
case 'notification_by_mail':
return 2;
- case 'plugins_list':
- case 'plugins_update':
- case 'plugins_new':
+ case 'plugins':
case 'plugin':
return 3;
@@ -2091,11 +2089,9 @@ function get_active_menu($menu_page)
case 'configuration':
case 'extend_for_templates':
case 'menubar':
- case 'themes_new':
- case 'themes_installed':
+ case 'themes':
case 'theme':
- case 'languages_installed':
- case 'languages_new':
+ case 'languages':
return 5;
}
return 0;
diff --git a/admin/include/languages.class.php b/admin/include/languages.class.php
index c19385412..cfcacc934 100644
--- a/admin/include/languages.class.php
+++ b/admin/include/languages.class.php
@@ -36,24 +36,6 @@ class languages
}
/**
- * Set tabsheet for languages pages.
- * @param string selected page.
- */
- function set_tabsheet($selected)
- {
- include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-
- $link = get_root_url().'admin.php?page=';
-
- $tabsheet = new tabsheet();
- $tabsheet->add('languages_installed', l10n('Installed Languages'), $link.'languages_installed');
- $tabsheet->add('languages_update', l10n('Check for updates'), $link.'languages_update');
- $tabsheet->add('languages_new', l10n('Add New Language'), $link.'languages_new');
- $tabsheet->select($selected);
- $tabsheet->assign();
- }
-
- /**
* Perform requested actions
* @param string - action
* @param string - language id
diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php
index 3f7cf4567..d1b8f5c5b 100644
--- a/admin/include/plugins.class.php
+++ b/admin/include/plugins.class.php
@@ -41,24 +41,6 @@ class plugins
}
}
- /**
- * Set tabsheet for plugins pages.
- * @param string selected page.
- */
- function set_tabsheet($selected)
- {
- include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-
- $link = get_root_url().'admin.php?page=';
-
- $tabsheet = new tabsheet();
- $tabsheet->add('plugins_list', l10n('Plugin list'), $link.'plugins_list');
- $tabsheet->add('plugins_update', l10n('Check for updates'), $link.'plugins_update');
- $tabsheet->add('plugins_new', l10n('Other plugins'), $link.'plugins_new');
- $tabsheet->select($selected);
- $tabsheet->assign();
- }
-
/**
* Perform requested actions
* @param string - action
diff --git a/admin/include/themes.class.php b/admin/include/themes.class.php
index 78716214e..294046976 100644
--- a/admin/include/themes.class.php
+++ b/admin/include/themes.class.php
@@ -41,24 +41,6 @@ class themes
}
/**
- * Set tabsheet for themes pages.
- * @param string selected page.
- */
- function set_tabsheet($selected)
- {
- include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-
- $link = get_root_url().'admin.php?page=';
-
- $tabsheet = new tabsheet();
- $tabsheet->add('themes_installed', l10n('Installed Themes'), $link.'themes_installed');
- $tabsheet->add('themes_update', l10n('Check for updates'), $link.'themes_update');
- $tabsheet->add('themes_new', l10n('Add New Theme'), $link.'themes_new');
- $tabsheet->select($selected);
- $tabsheet->assign();
- }
-
- /**
* Perform requested actions
* @param string - action
* @param string - theme id
diff --git a/admin/include/updates.class.php b/admin/include/updates.class.php
index b53001488..def4a1a2d 100644
--- a/admin/include/updates.class.php
+++ b/admin/include/updates.class.php
@@ -15,9 +15,14 @@ class updates
var $merged_extensions = array();
var $merged_extension_url = 'http://piwigo.org/download/merged_extensions.txt';
- function __construct()
+ function __construct($page='updates')
{
$this->types = array('plugins', 'themes', 'languages');
+
+ if (in_array($page, $this->types))
+ {
+ $this->types = array($page);
+ }
$this->default_themes = array('clear', 'dark', 'Sylvia');
$this->default_plugins = array('admin_multi_view', 'c13y_upgrade', 'language_switch', 'LocalFilesEditor');