mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
Add token to themes installation.
Only webmasters can install new plugins, themes or languages. git-svn-id: http://piwigo.org/svn/trunk@5406 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -36,13 +36,20 @@ $base_url = get_root_url().'admin.php?page='.$page['page'].'&order='.$order;
|
||||
$plugins = new plugins();
|
||||
|
||||
//------------------------------------------------------automatic installation
|
||||
if (isset($_GET['revision']) and isset($_GET['extension']) and !is_adviser())
|
||||
if (isset($_GET['revision']) and isset($_GET['extension']))
|
||||
{
|
||||
check_pwg_token();
|
||||
|
||||
$install_status = $plugins->extract_plugin_files('install', $_GET['revision'], $_GET['extension']);
|
||||
if (!is_webmaster())
|
||||
{
|
||||
array_push($page['errors'], l10n('Webmaster status is required.'));
|
||||
}
|
||||
else
|
||||
{
|
||||
check_pwg_token();
|
||||
|
||||
$install_status = $plugins->extract_plugin_files('install', $_GET['revision'], $_GET['extension']);
|
||||
|
||||
redirect($base_url.'&installstatus='.$install_status);
|
||||
redirect($base_url.'&installstatus='.$install_status);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------install result
|
||||
|
||||
Reference in New Issue
Block a user