aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-04-02 14:07:26 +0000
committermistic100 <mistic@piwigo.org>2011-04-02 14:07:26 +0000
commit488a911657c084a4a7201c2fde0a1ca074875345 (patch)
tree7abcf713b8ac21b87681703a2b03d5e3d440f3fd /admin
parent00b11dd74e34f1eed8db29edfda49a4b5ff32313 (diff)
bug:2022 admins can uninstall plugins
git-svn-id: http://piwigo.org/svn/trunk@9994 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/plugins_list.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/admin/plugins_list.php b/admin/plugins_list.php
index 0a8d77f9f..1a25ce009 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 ($_GET['action'] == '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);
}
}