Commit 2244c371 authored by sun's avatar sun

#272526 by smk-ka: Added file size to snapshot list.

parent 5dad0e1f
......@@ -6,6 +6,7 @@ Demo x.x-x.x, xxxx-xx-xx
Demo 5.x-1.x, xxxx-xx-xx
------------------------
#272526 by smk-ka: Added file size to snapshot list.
#268056 by sun: Fixed incomplete snapshots due to max_execution_time reached.
#265801 by smk-ka: Added exclusion of data in cache tables for snapshots.
......
......@@ -406,10 +406,12 @@ function demo_get_dumps() {
// Fetch list of available info files
$files = file_scan_directory($fileconfig['dumppath'], '.info$');
// Sort snapshots by date (ascending file modification time)
foreach ($files as $file => $object) {
$files[$file]->filemtime = filemtime($file);
$files[$file]->filesize = filesize(substr($file, 0, -4) .'sql');
}
// Sort snapshots by date (ascending file modification time)
uasort($files, create_function('$a, $b', 'return ($a->filemtime < $b->filemtime);'));
$options = array();
......@@ -429,7 +431,7 @@ function demo_get_dumps() {
$option = array();
$option['#type'] = 'radio';
$option['#name'] = 'filename';
$option['#title'] = $info['filename'] .' ('. format_date($file->filemtime, 'small') .')';
$option['#title'] = $info['filename'] .' ('. format_date($file->filemtime, 'small') .', '. format_size($file->filesize) .')';
$option['#return_value'] = $info['filename'];
if ($info['filename'] == variable_get('demo_dump_cron', 'demo_site')) {
$option['#value'] = $info['filename'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment