mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Merge remote-tracking branch 'origin/support/3.0' into develop
This commit is contained in:
@@ -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 <b>'".$sTmpDir."'</b> 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();
|
||||
@@ -1857,21 +1865,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<string, \CheckResult> 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 <b>'".APPROOT.$sDir."'</b> exists but is not writable for the application.");
|
||||
}
|
||||
else if (file_exists($sFullPath) && !is_dir($sFullPath))
|
||||
|
||||
@@ -631,10 +631,7 @@ EOF
|
||||
);
|
||||
if ($oMutex->IsLocked())
|
||||
{
|
||||
$oPage->add(<<<HTML
|
||||
<div class="message">An iTop cron process is being executed on the target database. iTop cron process will be stopped during the setup execution.</div>
|
||||
HTML
|
||||
);
|
||||
$oPage->add('<div class="message">'.ITOP_APPLICATION.' cron process is being executed on the target database. '.ITOP_APPLICATION.' cron process will be stopped during the setup execution.</div>');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -731,8 +728,8 @@ CSS
|
||||
$oPage->add('<br>');
|
||||
$oPage->add('<fieldset>');
|
||||
$oPage->add('<legend>European General Data Protection Regulation</legend>');
|
||||
$oPage->add('<div class="ibo-setup-licenses--components-list">iTop software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR).<p></p>
|
||||
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('<div class="ibo-setup-licenses--components-list">'.ITOP_APPLICATION.' software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR).<p></p>
|
||||
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.</p>
|
||||
<p>List of collected data available in our <a target="_blank" href="https://www.itophub.io/page/data-privacy">Data privacy section.</a></p><br></div>');
|
||||
$oPage->add('<input type="checkbox" class="check_select" id="rgpd_consent">');
|
||||
|
||||
Reference in New Issue
Block a user