BUG-13506 Corrección y aplicación de formato

This commit is contained in:
Roly Rudy Gutierrez Pinto
2013-11-25 17:58:52 -04:00
parent dc7e950351
commit 18969ebbce
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");
}
}