aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-03-25 22:38:09 +0000
committerpatdenice <patdenice@piwigo.org>2010-03-25 22:38:09 +0000
commitb01c5cc0967318c4572f0b4c74e93e673aa3eec0 (patch)
treeda93f65a16e7d915c530fcd73d19d00becf6b98f /admin
parent41de132f1e84c623f668ac18c69321d83b3a6770 (diff)
Move set_tabsheet function for plugins pages to plugins class.
git-svn-id: http://piwigo.org/svn/trunk@5367 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions_plugins.inc.php18
-rw-r--r--admin/include/plugins.class.php18
-rw-r--r--admin/plugins_list.php2
-rw-r--r--admin/plugins_new.php2
-rw-r--r--admin/plugins_update.php2
5 files changed, 21 insertions, 21 deletions
diff --git a/admin/include/functions_plugins.inc.php b/admin/include/functions_plugins.inc.php
index 6710b7470..693ca7707 100644
--- a/admin/include/functions_plugins.inc.php
+++ b/admin/include/functions_plugins.inc.php
@@ -43,22 +43,4 @@ function get_admin_plugin_menu_link($file)
}
return $url;
}
-
-/**
- * Set tabsheet for plugins pages.
- * @param string selected page.
- */
-function set_plugins_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();
-}
?> \ No newline at end of file
diff --git a/admin/include/plugins.class.php b/admin/include/plugins.class.php
index 8b5cdd4d0..b099fc4e9 100644
--- a/admin/include/plugins.class.php
+++ b/admin/include/plugins.class.php
@@ -40,6 +40,24 @@ 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/plugins_list.php b/admin/plugins_list.php
index 913672ce5..f09b0d576 100644
--- a/admin/plugins_list.php
+++ b/admin/plugins_list.php
@@ -54,7 +54,7 @@ if (isset($_GET['action']) and isset($_GET['plugin']) and !is_adviser())
}
//--------------------------------------------------------------------Tabsheet
-set_plugins_tabsheet($page['page']);
+$plugins->set_tabsheet($page['page']);
//---------------------------------------------------------------Order options
$link = get_root_url().'admin.php?page='.$page['page'].'&amp;order=';
diff --git a/admin/plugins_new.php b/admin/plugins_new.php
index c6d6e0f8a..d699e57d9 100644
--- a/admin/plugins_new.php
+++ b/admin/plugins_new.php
@@ -76,7 +76,7 @@ if (isset($_GET['installstatus']))
}
//--------------------------------------------------------------------Tabsheet
-set_plugins_tabsheet($page['page']);
+$plugins->set_tabsheet($page['page']);
//---------------------------------------------------------------Order options
$link = get_root_url().'admin.php?page='.$page['page'].'&amp;order=';
diff --git a/admin/plugins_update.php b/admin/plugins_update.php
index 13e856375..07876ca18 100644
--- a/admin/plugins_update.php
+++ b/admin/plugins_update.php
@@ -95,7 +95,7 @@ if (isset($_GET['upgradestatus']) and isset($_GET['plugin']))
}
//--------------------------------------------------------------------Tabsheet
-set_plugins_tabsheet($page['page']);
+$plugins->set_tabsheet($page['page']);
// +-----------------------------------------------------------------------+
// | start template output |