mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 00:28:47 +02:00
N°2522 - API : Deprecate SetupPage:log*
This commit is contained in:
@@ -253,7 +253,7 @@ class SetupUtils
|
||||
}
|
||||
}
|
||||
}
|
||||
SetupPage::log("Info - php.ini file(s): '$sPhpIniFile'");
|
||||
SetupLog::Ok("Info - php.ini file(s): '$sPhpIniFile'");
|
||||
}
|
||||
|
||||
if (!ini_get('file_uploads'))
|
||||
@@ -280,7 +280,7 @@ class SetupUtils
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupPage::log("Info - Temporary directory for files upload ($sUploadTmpDir) is writable.");
|
||||
SetupLog::Ok("Info - Temporary directory for files upload ($sUploadTmpDir) is writable.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,9 +305,9 @@ class SetupUtils
|
||||
}
|
||||
|
||||
|
||||
SetupPage::log("Info - upload_max_filesize: ".ini_get('upload_max_filesize'));
|
||||
SetupPage::log("Info - post_max_size: ".ini_get('post_max_size'));
|
||||
SetupPage::log("Info - max_file_uploads: ".ini_get('max_file_uploads'));
|
||||
SetupLog::Ok("Info - upload_max_filesize: ".ini_get('upload_max_filesize'));
|
||||
SetupLog::Ok("Info - post_max_size: ".ini_get('post_max_size'));
|
||||
SetupLog::Ok("Info - max_file_uploads: ".ini_get('max_file_uploads'));
|
||||
|
||||
// Check some more ini settings here, needed for file upload
|
||||
$sMemoryLimit = trim(ini_get('memory_limit'));
|
||||
@@ -329,7 +329,7 @@ class SetupUtils
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupPage::log("Info - memory_limit is $iMemoryLimit, ok.");
|
||||
SetupLog::Ok("Info - memory_limit is $iMemoryLimit, ok.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ class SetupUtils
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupPage::log("Info - suhosin.get.max_value_length = $iGetMaxValueLength, ok.");
|
||||
SetupLog::Ok("Info - suhosin.get.max_value_length = $iGetMaxValueLength, ok.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ class SetupUtils
|
||||
if (ini_get('session.save_handler') == 'files')
|
||||
{
|
||||
$sSavePath = ini_get('session.save_path');
|
||||
SetupPage::log("Info - session.save_path is: '$sSavePath'.");
|
||||
SetupLog::Ok("Info - session.save_path is: '$sSavePath'.");
|
||||
|
||||
// According to the PHP documentation, the format can be /path/where/to_save_sessions or "N;/path/where/to_save_sessions" or "N;MODE;/path/where/to_save_sessions"
|
||||
$sSavePath = ltrim(rtrim($sSavePath, '"'), '"'); // remove surrounding quotes (if any)
|
||||
@@ -450,7 +450,7 @@ class SetupUtils
|
||||
*/
|
||||
private static function CheckPhpVersion(&$aResult)
|
||||
{
|
||||
SetupPage::log('Info - CheckPHPVersion');
|
||||
SetupLog::Ok('Info - CheckPHPVersion');
|
||||
$sPhpVersion = phpversion();
|
||||
|
||||
if (version_compare($sPhpVersion, self::PHP_MIN_VERSION, '>='))
|
||||
@@ -497,7 +497,7 @@ class SetupUtils
|
||||
public static function CheckSelectedModules($sSourceDir, $sExtensionDir, $aSelectedModules)
|
||||
{
|
||||
$aResult = array();
|
||||
SetupPage::log('Info - CheckSelectedModules');
|
||||
SetupLog::Ok('Info - CheckSelectedModules');
|
||||
|
||||
$aDirsToScan = array(APPROOT.$sSourceDir);
|
||||
$sExtensionsPath = APPROOT.$sExtensionDir;
|
||||
@@ -528,7 +528,7 @@ class SetupUtils
|
||||
public static function CheckBackupPrerequisites($sDBBackupPath, $sMySQLBinDir = null)
|
||||
{
|
||||
$aResult = array();
|
||||
SetupPage::log('Info - CheckBackupPrerequisites');
|
||||
SetupLog::Ok('Info - CheckBackupPrerequisites');
|
||||
|
||||
// zip extension
|
||||
//
|
||||
@@ -546,7 +546,7 @@ class SetupUtils
|
||||
// availability of exec()
|
||||
//
|
||||
$aDisabled = explode(', ', ini_get('disable_functions'));
|
||||
SetupPage::log('Info - PHP functions disabled: '.implode(', ', $aDisabled));
|
||||
SetupLog::Ok('Info - PHP functions disabled: '.implode(', ', $aDisabled));
|
||||
if (in_array('exec', $aDisabled))
|
||||
{
|
||||
$aResult[] = new CheckResult(CheckResult::ERROR, "The PHP exec() function has been disabled on this server");
|
||||
@@ -564,7 +564,7 @@ class SetupUtils
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupPage::log('Info - Found mysql_bindir: '.$sMySQLBinDir);
|
||||
SetupLog::Ok('Info - Found mysql_bindir: '.$sMySQLBinDir);
|
||||
$sMySQLDump = '"'.$sMySQLBinDir.'/mysqldump"';
|
||||
}
|
||||
$sCommand = "$sMySQLDump -V 2>&1";
|
||||
@@ -588,7 +588,7 @@ class SetupUtils
|
||||
}
|
||||
foreach($aOutput as $sLine)
|
||||
{
|
||||
SetupPage::log('Info - mysqldump -V said: '.$sLine);
|
||||
SetupLog::Ok('Info - mysqldump -V said: '.$sLine);
|
||||
}
|
||||
|
||||
// create and test destination location
|
||||
@@ -618,12 +618,12 @@ class SetupUtils
|
||||
public static function CheckGraphviz($sGraphvizPath)
|
||||
{
|
||||
$oResult = null;
|
||||
SetupPage::log('Info - CheckGraphviz');
|
||||
SetupLog::Ok('Info - CheckGraphviz');
|
||||
|
||||
// availability of exec()
|
||||
//
|
||||
$aDisabled = explode(', ', ini_get('disable_functions'));
|
||||
SetupPage::log('Info - PHP functions disabled: '.implode(', ', $aDisabled));
|
||||
SetupLog::Ok('Info - PHP functions disabled: '.implode(', ', $aDisabled));
|
||||
if (in_array('exec', $aDisabled))
|
||||
{
|
||||
$aResult[] = new CheckResult(CheckResult::ERROR, "The PHP exec() function has been disabled on this server");
|
||||
@@ -653,7 +653,7 @@ class SetupUtils
|
||||
}
|
||||
foreach($aOutput as $sLine)
|
||||
{
|
||||
SetupPage::log('Info - '.$sGraphvizPath.' -V said: '.$sLine);
|
||||
SetupLog::Ok('Info - '.$sGraphvizPath.' -V said: '.$sLine);
|
||||
}
|
||||
|
||||
return $oResult;
|
||||
@@ -726,11 +726,11 @@ class SetupUtils
|
||||
{
|
||||
if (!unlink($dir.'/'.$file))
|
||||
{
|
||||
SetupPage::log("Warning - FAILED to remove file '$dir/$file'");
|
||||
SetupLog::Ok("Warning - FAILED to remove file '$dir/$file'");
|
||||
}
|
||||
else if (file_exists($dir.'/'.$file))
|
||||
{
|
||||
SetupPage::log("Warning - FAILED to remove file '$dir/.$file'");
|
||||
SetupLog::Ok("Warning - FAILED to remove file '$dir/.$file'");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2115,7 +2115,7 @@ JS
|
||||
{
|
||||
if (class_exists('SetupPage'))
|
||||
{
|
||||
SetupPage::log($sText);
|
||||
SetupLog::Ok($sText);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user