Ignore:
Timestamp:
Mar 27, 2010, 6:32:45 PM (14 years ago)
Author:
patdenice
Message:

Add token to themes installation.
Only webmasters can install new plugins, themes or languages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/plugins_new.php

    r5367 r5406  
    3737
    3838//------------------------------------------------------automatic installation
    39 if (isset($_GET['revision']) and isset($_GET['extension']) and !is_adviser())
     39if (isset($_GET['revision']) and isset($_GET['extension']))
    4040{
    41   check_pwg_token();
    42  
    43   $install_status = $plugins->extract_plugin_files('install', $_GET['revision'], $_GET['extension']);
     41  if (!is_webmaster())
     42  {
     43    array_push($page['errors'], l10n('Webmaster status is required.'));
     44  }
     45  else
     46  {
     47    check_pwg_token();
     48   
     49    $install_status = $plugins->extract_plugin_files('install', $_GET['revision'], $_GET['extension']);
    4450
    45   redirect($base_url.'&installstatus='.$install_status);
     51    redirect($base_url.'&installstatus='.$install_status);
     52  }
    4653}
    4754
Note: See TracChangeset for help on using the changeset viewer.