mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
@@ -52,7 +52,7 @@ function ws_plugins_getList($params, $service)
|
||||
*/
|
||||
function ws_plugins_performAction($params, $service)
|
||||
{
|
||||
global $template;
|
||||
global $template, $conf;
|
||||
|
||||
if (get_pwg_token() != $params['pwg_token'])
|
||||
{
|
||||
@@ -64,6 +64,11 @@ function ws_plugins_performAction($params, $service)
|
||||
return new PwgError(403, l10n('Webmaster status is required.'));
|
||||
}
|
||||
|
||||
if (!$conf['enable_extensions_install'] and 'delete' == $params['action'])
|
||||
{
|
||||
return new PwgError(401, 'Piwigo extensions install/update/delete system is disabled');
|
||||
}
|
||||
|
||||
define('IN_ADMIN', true);
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
|
||||
|
||||
@@ -94,13 +99,18 @@ function ws_plugins_performAction($params, $service)
|
||||
*/
|
||||
function ws_themes_performAction($params, $service)
|
||||
{
|
||||
global $template;
|
||||
global $template, $conf;
|
||||
|
||||
if (get_pwg_token() != $params['pwg_token'])
|
||||
{
|
||||
return new PwgError(403, 'Invalid security token');
|
||||
}
|
||||
|
||||
if (!$conf['enable_extensions_install'] and 'delete' == $params['action'])
|
||||
{
|
||||
return new PwgError(401, 'Piwigo extensions install/update/delete system is disabled');
|
||||
}
|
||||
|
||||
define('IN_ADMIN', true);
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user