Changeset 9994


Ignore:
Timestamp:
Apr 2, 2011, 4:07:26 PM (10 years ago)
Author:
mistic100
Message:

bug:2022 admins can uninstall plugins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/plugins_list.php

    r8728 r9994  
    3939if (isset($_GET['action']) and isset($_GET['plugin']))
    4040{
    41   check_pwg_token();
     41  if ($_GET['action'] == 'uninstall' AND !is_webmaster())
     42  {
     43    array_push($page['errors'], l10n('Webmaster status is required.'));
     44  }
     45  else
     46  {
     47    check_pwg_token();
    4248
    43   $page['errors'] = $plugins->perform_action($_GET['action'], $_GET['plugin']);
     49    $page['errors'] = $plugins->perform_action($_GET['action'], $_GET['plugin']);
    4450
    45   if (empty($page['errors']))
    46   {
    47     if ($_GET['action'] == 'activate' or $_GET['action'] == 'deactivate')
     51    if (empty($page['errors']))
    4852    {
    49       $template->delete_compiled_templates();
     53      if ($_GET['action'] == 'activate' or $_GET['action'] == 'deactivate')
     54      {
     55        $template->delete_compiled_templates();
     56      }
     57      redirect($base_url);
    5058    }
    51     redirect($base_url);
    5259  }
    5360}
Note: See TracChangeset for help on using the changeset viewer.