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:
patdenice
2008-03-05 17:54:32 +00:00
parent ef77dac315
commit 7e1e705f8b
3 changed files with 236 additions and 427 deletions

View File

@@ -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 .= '&section=' . $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 .= '&section=' . $page['section'];
// +-----------------------------------------------------------------------+
// | start template output |
// +-----------------------------------------------------------------------+