From a076d4b461952dceb777ce622ad6ef68bf7a94ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jun 2018 01:53:36 +0200 Subject: [PATCH] Fix translation during install --- htdocs/install/inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index f51254620af..810e289d7e3 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -172,6 +172,12 @@ if (! empty($dolibarr_main_document_root_alt)) // Security check (old method, when directory is renamed /install.lock) if (preg_match('/install\.lock/i',$_SERVER["SCRIPT_FILENAME"])) { + if (! is_object($langs)) + { + $langs = new Translate('..'); + $langs->setDefaultLang('auto'); + } + $langs->load("install"); print $langs->trans("YouTryInstallDisabledByDirLock"); if (! empty($dolibarr_main_url_root)) { @@ -190,6 +196,12 @@ if (constant('DOL_DATA_ROOT') === null) { } if (@file_exists($lockfile)) { + if (! is_object($langs)) + { + $langs = new Translate('..'); + $langs->setDefaultLang('auto'); + } + $langs->load("install"); print $langs->trans("YouTryInstallDisabledByFileLock"); if (! empty($dolibarr_main_url_root)) {