mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
Move set_tabsheet function for plugins pages to plugins class.
git-svn-id: http://piwigo.org/svn/trunk@5367 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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();
|
||||
}
|
||||
?>
|
||||
@@ -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
|
||||
|
||||
@@ -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'].'&order=';
|
||||
|
||||
@@ -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'].'&order=';
|
||||
|
||||
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user