issue #1852 ability to disable core/extensions updates

This commit is contained in:
plegall
2023-01-20 18:32:10 +01:00
parent 69171539d5
commit f4de473db8
11 changed files with 86 additions and 19 deletions
+6
View File
@@ -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
+7
View File
@@ -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.'));