mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
tmp work: save timestamp + few fixes
This commit is contained in:
@@ -60,6 +60,7 @@ class MFCompiler
|
||||
protected $aSnippets;
|
||||
protected $aRelations;
|
||||
protected $sEnvironment;
|
||||
protected $sCompilationTimeStamp;
|
||||
|
||||
public function __construct($oModelFactory, $sEnvironment)
|
||||
{
|
||||
@@ -74,7 +75,8 @@ class MFCompiler
|
||||
$this->sMainPHPCode .= " * This file was automatically generated by the compiler on ".date('Y-m-d H:i:s')." -- DO NOT EDIT\n";
|
||||
$this->sMainPHPCode .= " */\n";
|
||||
$this->sMainPHPCode .= "\n";
|
||||
$this->sMainPHPCode .= "define('COMPILATION_TIMESTAMP', '".microtime(true)."');\n";
|
||||
$this->sCompilationTimeStamp = microtime(true);
|
||||
$this->sMainPHPCode .= "define('COMPILATION_TIMESTAMP', '".$this->sCompilationTimeStamp."');\n";
|
||||
$this->aSnippets = array();
|
||||
$this->aRelations = array();
|
||||
}
|
||||
@@ -96,6 +98,14 @@ class MFCompiler
|
||||
{
|
||||
return $this->aLog;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function GetCompilationTimeStamp()
|
||||
{
|
||||
return $this->sCompilationTimeStamp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -2759,7 +2769,7 @@ EOF;
|
||||
{
|
||||
$this->Log("Precompiled file not found: '$sPrecompiledFile'");
|
||||
}
|
||||
ThemeHandler::CompileTheme($sThemeId, true, $aThemeParameters, $aImportsPaths, $sTempTargetDir);
|
||||
ThemeHandler::CompileTheme($sThemeId, $this->GetCompilationTimeStamp(), $aThemeParameters, $aImportsPaths, $sTempTargetDir);
|
||||
}
|
||||
$this->Log(sprintf('Themes compilation took: %.3f ms for %d themes.', (microtime(true) - $fStart)*1000.0, count($aThemes)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user