Remove hash detect information

This commit is contained in:
RainLoop Team 2013-11-22 02:07:37 +04:00
parent 0618eb7ca2
commit 8d5b7a0632
2 changed files with 3 additions and 27 deletions

View file

@ -1634,11 +1634,9 @@ class Actions
$bFilesCache = false;
$bActivity = false;
$bPing = false;
$bReHash = false;
$iOneDay1 = 60 * 60 * 23;
$iOneDay2 = 60 * 60 * 25;
$iOneDay3 = $iOneDay2 * 2;
$sTimers = $this->StorageProvider()->Get(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, 'Cache/Timers', '');
@ -1649,7 +1647,6 @@ class Actions
$iFilesCacheTime = !empty($aTimers[1]) && \is_numeric($aTimers[1]) ? (int) $aTimers[1] : 0;
$iActivityTime = !empty($aTimers[2]) && \is_numeric($aTimers[2]) ? (int) $aTimers[2] : 0;
$iPingTime = !empty($aTimers[3]) && \is_numeric($aTimers[3]) ? (int) $aTimers[3] : 0;
$iReHashTime = !empty($aTimers[4]) && \is_numeric($aTimers[4]) ? (int) $aTimers[4] : 0;
if (0 === $iMainCacheTime || $iMainCacheTime + $iOneDay1 < \time())
{
@ -1675,19 +1672,13 @@ class Actions
$iPingTime = \time();
}
if (0 === $iReHashTime || $iReHashTime + $iOneDay3 < \time())
{
$bReHash = true;
$iReHashTime = \time();
}
if ($bMainCache || $bFilesCache || $bActivity || $bPing || $bReHash)
if ($bMainCache || $bFilesCache || $bActivity || $bPing)
{
if (!$this->StorageProvider()->Put(null,
\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY, 'Cache/Timers',
\implode(',', array($iMainCacheTime, $iFilesCacheTime, $iActivityTime, $iPingTime))))
{
$bMainCache = $bFilesCache = $bActivity = $bPing = $bReHash = false;
$bMainCache = $bFilesCache = $bActivity = $bPing = false;
}
}
@ -1717,13 +1708,6 @@ class Actions
$this->KeenIO('Ping');
}
if ($bReHash)
{
$sHash = \RainLoop\Utils::PathMD5(APP_VERSION_ROOT_PATH);
$this->Logger()->Write('App Hash: '.$sHash);
@\file_put_contents(APP_DATA_FOLDER_PATH.'HASH', $sHash);
}
$this->Plugins()->RunHook('service.app-delay-start-end');
return $this->TrueResponse(__FUNCTION__);
@ -5183,7 +5167,6 @@ class Actions
private function setupInformation()
{
$aResult = array(
'hash' => \file_exists(APP_DATA_FOLDER_PATH.'HASH') ? \md5(@\file_get_contents(APP_DATA_FOLDER_PATH.'HASH')) : '',
'version-full' => APP_VERSION,
);

View file

@ -143,18 +143,12 @@ class Service
$aData = $this->startUpData($bAdmin);
$sAppHash = '';
if (\file_exists(APP_DATA_FOLDER_PATH.'HASH'))
{
$sAppHash = md5(@\file_get_contents(APP_DATA_FOLDER_PATH.'HASH'));
}
$bCacheEnabled = $this->oActions->Config()->Get('labs', 'cache_system_data', true);
$sCacheFileName = '';
if ($bCacheEnabled)
{
$sCacheFileName = 'TMPL:'.$aData['Hash'].'/'.$sAppHash;
$sCacheFileName = 'TMPL:'.$aData['Hash'];
$sResult = $this->oActions->Cacher()->Get($sCacheFileName);
}
@ -189,7 +183,6 @@ class Service
$sResult .= '][time:'.substr(\microtime(true) - APP_START, 0, 6);
$sResult .= '][cached:'.($bCached ? 'true' : 'false');
$sResult .= '][session:'.md5(\RainLoop\Utils::GetShortToken());
$sResult .= '][hash:'.$sAppHash;
$sResult .= '] -->';
}