mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 01:42:29 +02:00
issue #1852 ability to disable core/extensions updates
This commit is contained in:
@@ -853,6 +853,12 @@ $conf['themes_dir'] = PHPWG_ROOT_PATH.'themes';
|
||||
// enable the synchronization method for adding photos
|
||||
$conf['enable_synchronization'] = true;
|
||||
|
||||
// enable the update of Piwigo core from administration pages
|
||||
$conf['enable_core_update'] = true;
|
||||
|
||||
// enable install/update of plugins/themes/languages from administration pages
|
||||
$conf['enable_extensions_install'] = true;
|
||||
|
||||
// Permitted characters for files/directories during synchronization.
|
||||
// Do not add the ' U+0027 single quote apostrophe character, it WILL make some
|
||||
// SQL queries fail. URI reserved characters (see
|
||||
|
||||
@@ -133,6 +133,13 @@ function ws_themes_performAction($params, $service)
|
||||
*/
|
||||
function ws_extensions_update($params, $service)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (!$conf['enable_extensions_install'])
|
||||
{
|
||||
return new PwgError(401, 'Piwigo extensions install/update system is disabled');
|
||||
}
|
||||
|
||||
if (!is_webmaster())
|
||||
{
|
||||
return new PwgError(401, l10n('Webmaster status is required.'));
|
||||
|
||||
Reference in New Issue
Block a user