mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
user_list.tpl goes smarty.
Correction in plugins update and delete options. git-svn-id: http://piwigo.org/svn/trunk@2253 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -34,6 +34,34 @@ check_status(ACCESS_ADMINISTRATOR);
|
||||
$my_base_url = PHPWG_ROOT_PATH.'admin.php?page=plugins';
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Sections definitions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
if (empty($_GET['section']))
|
||||
{
|
||||
$page['section'] = 'list';
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['section'] = $_GET['section'];
|
||||
}
|
||||
|
||||
$tab_link = $my_base_url . '&section=';
|
||||
|
||||
// TabSheet
|
||||
$tabsheet = new tabsheet();
|
||||
// TabSheet initialization
|
||||
$tabsheet->add('list', l10n('plugins_tab_list'), $tab_link.'list');
|
||||
$tabsheet->add('update', l10n('plugins_tab_update'), $tab_link.'update');
|
||||
$tabsheet->add('new', l10n('plugins_tab_new'), $tab_link.'new');
|
||||
// TabSheet selection
|
||||
$tabsheet->select($page['section']);
|
||||
// Assign tabsheet to template
|
||||
$tabsheet->assign();
|
||||
|
||||
$my_base_url .= '§ion=' . $page['section'];
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | perform requested actions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
@@ -153,7 +181,11 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"';
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
if (!deltree(PHPWG_PLUGINS_PATH . $plugin_id))
|
||||
if (!empty($crt_db_plugin))
|
||||
{
|
||||
array_push($errors, 'CANNOT delete - PLUGIN IS INSTALLED');
|
||||
}
|
||||
elseif (!deltree(PHPWG_PLUGINS_PATH . $plugin_id))
|
||||
{
|
||||
send_to_trash(PHPWG_PLUGINS_PATH . $plugin_id);
|
||||
}
|
||||
@@ -176,34 +208,6 @@ DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"';
|
||||
}
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Sections definitions |
|
||||
// +-----------------------------------------------------------------------+
|
||||
if (empty($_GET['section']))
|
||||
{
|
||||
$page['section'] = 'list';
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['section'] = $_GET['section'];
|
||||
}
|
||||
|
||||
$tab_link = $my_base_url . '&section=';
|
||||
|
||||
// TabSheet
|
||||
$tabsheet = new tabsheet();
|
||||
// TabSheet initialization
|
||||
$tabsheet->add('list', l10n('plugins_tab_list'), $tab_link.'list');
|
||||
$tabsheet->add('update', l10n('plugins_tab_update'), $tab_link.'update');
|
||||
$tabsheet->add('new', l10n('plugins_tab_new'), $tab_link.'new');
|
||||
// TabSheet selection
|
||||
$tabsheet->select($page['section']);
|
||||
// Assign tabsheet to template
|
||||
$tabsheet->assign();
|
||||
|
||||
$my_base_url .= '§ion=' . $page['section'];
|
||||
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | start template output |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user