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/themes_new.php

    r5153 r5406  
    5454// +-----------------------------------------------------------------------+
    5555
    56 if (isset($_GET['revision']) and isset($_GET['extension']) and !is_adviser())
     56if (isset($_GET['revision']) and isset($_GET['extension']))
    5757{
    58   $install_status = $themes->extract_theme_files(
    59     'install',
    60     $_GET['revision'],
    61     $_GET['extension']
    62     );
    63  
    64   redirect($base_url.'&installstatus='.$install_status);
     58  if (!is_webmaster())
     59  {
     60    array_push($page['errors'], l10n('Webmaster status is required.'));
     61  }
     62  else
     63  {
     64    check_pwg_token();
     65
     66    $install_status = $themes->extract_theme_files(
     67      'install',
     68      $_GET['revision'],
     69      $_GET['extension']
     70      );
     71   
     72    redirect($base_url.'&installstatus='.$install_status);
     73  }
    6574}
    6675
     
    113122      . '&revision=' . $theme['revision_id']
    114123      . '&extension=' . $theme['extension_id']
     124      . '&pwg_token='.get_pwg_token()
    115125      ;
    116126
Note: See TracChangeset for help on using the changeset viewer.