Fix installmodules.lock must also block module builder
This commit is contained in:
parent
db454a6374
commit
aacb7b16a4
@ -1932,7 +1932,7 @@ BackupDumpWizard=Wizard to build the database dump file
|
||||
BackupZipWizard=Wizard to build the archive of documents directory
|
||||
SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason:
|
||||
SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is a manual process only a privileged user may perform.
|
||||
InstallModuleFromWebHasBeenDisabledContactUs=Install of external modules from the application is currently locked. Please contact us if you need us to enable this feature.
|
||||
InstallModuleFromWebHasBeenDisabledContactUs=Install or development of external modules from the application is currently locked for security purpose. Please contact us if you need to enable this feature.
|
||||
InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file <strong>%s</strong> to allow this feature.
|
||||
ConfFileMustContainCustom=Installing or building an external module from application need to save the module files into directory <strong>%s</strong>. To have this directory processed by Dolibarr, you must setup your <strong>conf/conf.php</strong> to add the 2 directive lines:<br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong>
|
||||
HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over
|
||||
|
||||
@ -1974,6 +1974,28 @@ if ($message) {
|
||||
$infomodulesfound = '<div style="padding: 12px 9px 12px">'.$form->textwithpicto('', $langs->trans("ModuleBuilderDesc3", count($listofmodules)).'<br><br>'.$langs->trans("ModuleBuilderDesc4", $FILEFLAG).'<br>'.$textforlistofdirs).'</div>';
|
||||
|
||||
|
||||
|
||||
$dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT);
|
||||
$allowonlineinstall = true;
|
||||
if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) {
|
||||
$allowonlineinstall = false;
|
||||
}
|
||||
if (empty($allowonlineinstall)) {
|
||||
if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) {
|
||||
// Show clean message
|
||||
$message = info_admin($langs->trans('InstallModuleFromWebHasBeenDisabledContactUs'));
|
||||
} else {
|
||||
// Show technical message
|
||||
$message = info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock'), 0, 0, 1, 'warning');
|
||||
}
|
||||
|
||||
print $message;
|
||||
|
||||
llxFooter();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
// Load module descriptor
|
||||
$error = 0;
|
||||
$moduleobj = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user