BUG-13506 Corrección de formato

This commit is contained in:
roly
2013-11-25 17:42:49 -04:00
parent 65bb06ff4e
commit d49dd2a940
3 changed files with 11 additions and 9 deletions

View File

@@ -1417,13 +1417,15 @@ class workspaceTools
public function backupLogFiles()
{
$config = System::getSystemConfiguration();
clearstatcache();
$path = PATH_DATA . "log" . PATH_SEP;
$filePath = $path . "cron.log";
if (file_exists($filePath)) {
$size = filesize($filePath);
/* 5000000 -> approximately 5 megabytes */
if ($size > 5000000) {
/* $config['size_log_file'] has the value 5000000 -> approximately 5 megabytes */
if ($size > $config['size_log_file']) {
rename($filePath, $filePath . ".bak");
}
}