mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 10:40:57 +00:00
Added auto-save for graphs. Iteraion 1.
This commit is contained in:
@@ -39,12 +39,21 @@ $age6mLessCallback = function($age)
|
||||
return $age <= 6;
|
||||
};
|
||||
|
||||
$age1mLessCallback = function($age)
|
||||
{
|
||||
return $age <= 1;
|
||||
};
|
||||
|
||||
$graphTimes = array();
|
||||
|
||||
$totalGraphCount = 0;
|
||||
$totalGraphSize = 0; // In Kb
|
||||
$ageGraph = 0;
|
||||
|
||||
$totalAutosaveGraphCount = 0;
|
||||
$totalAutosaveGraphSize = 0; // In Kb
|
||||
$ageAutosaveGraph = 0;
|
||||
|
||||
$totalImages = 0;
|
||||
$totalImagesSize = 0; // In Kb
|
||||
$ageImage = 0;
|
||||
@@ -99,6 +108,7 @@ $ageActionCallback = function(&$ageCount, $file)
|
||||
};
|
||||
|
||||
processFiles($g_config['graphSavePath'] . "*.xml", $totalGraphCount, $totalGraphSize, $ageGraph, $age6mLessCallback, $ageActionCallback);
|
||||
processFiles($g_config['graphSavePath'] . "autosave/*.xml", $totalAutosaveGraphCount, $totalAutosaveGraphSize, $ageAutosaveGraph, $age1mLessCallback, $ageActionCallback);
|
||||
processFiles($g_config['graphSavePath'] . "*.png", $totalImages, $totalImagesSize, $ageImage, $age6mLessCallback, $ageActionCallback);
|
||||
|
||||
$totalGraphSize = intval($totalGraphSize);
|
||||
|
||||
Reference in New Issue
Block a user