diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index e80838e27..75508f585 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -151,6 +151,14 @@ class SetupUtils } $aWritableDirsErrors = self::CheckWritableDirs($aWritableDirs); $aResult = array_merge($aResult, $aWritableDirsErrors); + // Check temp dir (N°5235) : as this path isn't under APPROOT we are doing a custom check and not using \SetupUtils::CheckWritableDirs + $sTmpDir = static::GetTmpDir(); + clearstatcache(true, $sTmpDir); + if (is_writable($sTmpDir)) { + $aResult[] = new CheckResult(CheckResult::INFO, "The temp directory is writable by the application."); + } else { + $aResult[] = new CheckResult(CheckResult::WARNING, "The temp directory '".$sTmpDir."' is not writable by the application. Change its permission or use another dir (sys_temp_dir option in php.ini)."); + } $aMandatoryExtensions = self::GetPHPMandatoryExtensions(); $aOptionalExtensions = self::GetPHPOptionalExtensions(); @@ -1869,21 +1877,30 @@ JS public static function GetVersionManifest($sInstalledVersion) { - if (preg_match('/^([0-9]+)\./', $sInstalledVersion, $aMatches)) - { + if (preg_match('/^([0-9]+)\./', $sInstalledVersion, $aMatches)) { return APPROOT.'datamodels/'.$aMatches[1].'.x/manifest-'.$sInstalledVersion.'.xml'; } + return false; } + /** + * Check paths relative to APPROOT : is existing, is dir, is writable + * + * @param string[] $aWritableDirs list of dirs to check, relative to APPROOT (for example : `['log','conf','data']`) + * + * @return array full path as key, CheckResult error as value + * + * @uses \is_dir() + * @uses \is_writable() + * @uses \file_exists() + */ public static function CheckWritableDirs($aWritableDirs) { $aNonWritableDirs = array(); - foreach($aWritableDirs as $sDir) - { + foreach ($aWritableDirs as $sDir) { $sFullPath = APPROOT.$sDir; - if (is_dir($sFullPath) && !is_writable($sFullPath)) - { + if (is_dir($sFullPath) && !is_writable($sFullPath)) { $aNonWritableDirs[APPROOT.$sDir] = new CheckResult(CheckResult::ERROR, "The directory '".APPROOT.$sDir."' exists but is not writable for the application."); } else if (file_exists($sFullPath) && !is_dir($sFullPath)) diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index dcaa4c13a..e29df3ac5 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -645,10 +645,7 @@ EOF ); if ($oMutex->IsLocked()) { - $oPage->add(<<An iTop cron process is being executed on the target database. iTop cron process will be stopped during the setup execution. -HTML - ); + $oPage->add('
'.ITOP_APPLICATION.' cron process is being executed on the target database. '.ITOP_APPLICATION.' cron process will be stopped during the setup execution.
'); } } } @@ -745,8 +742,8 @@ CSS $oPage->add('
'); $oPage->add('
'); $oPage->add('European General Data Protection Regulation'); - $oPage->add('
iTop software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR).

-By installing iTop you agree that some information will be collected by Combodo to help you manage your instances and for statistical purposes. + $oPage->add('
'.ITOP_APPLICATION.' software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR).

+By installing '.ITOP_APPLICATION.' you agree that some information will be collected by Combodo to help you manage your instances and for statistical purposes. This data remains anonymous until it is associated to a user account on iTop Hub.

List of collected data available in our Data privacy section.


'); $oPage->add('');