diff options
author | mistic100 <mistic@piwigo.org> | 2011-04-03 08:58:20 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2011-04-03 08:58:20 +0000 |
commit | eccc2dd4343cc2edca7f9fd6d82dcea3fe1db2c7 (patch) | |
tree | f60a58cbc99cc9d714eaf5b76a93701104a39cb1 /admin | |
parent | 2659784b20361189fc788aad29f190eda4a3a645 (diff) |
merge r9995 from trunk to branch 2.2
git-svn-id: http://piwigo.org/svn/branches/2.2@10007 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/plugins_list.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/admin/plugins_list.php b/admin/plugins_list.php index 0a8d77f9f..21e8ec3f2 100644 --- a/admin/plugins_list.php +++ b/admin/plugins_list.php @@ -38,17 +38,24 @@ $plugins = new plugins(); //--------------------------------------------------perform requested actions if (isset($_GET['action']) and isset($_GET['plugin'])) { - check_pwg_token(); + if (in_array($_GET['action'], array('install', 'uninstall')) AND !is_webmaster()) + { + array_push($page['errors'], l10n('Webmaster status is required.')); + } + else + { + check_pwg_token(); - $page['errors'] = $plugins->perform_action($_GET['action'], $_GET['plugin']); + $page['errors'] = $plugins->perform_action($_GET['action'], $_GET['plugin']); - if (empty($page['errors'])) - { - if ($_GET['action'] == 'activate' or $_GET['action'] == 'deactivate') + if (empty($page['errors'])) { - $template->delete_compiled_templates(); + if ($_GET['action'] == 'activate' or $_GET['action'] == 'deactivate') + { + $template->delete_compiled_templates(); + } + redirect($base_url); } - redirect($base_url); } } |