Index: branches/RC/core/units/admin/admin_tag_processor.php =================================================================== diff -u -r10721 -r10739 --- branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 10721) +++ branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 10739) @@ -916,7 +916,7 @@ if( getArrayValue($params, 'as_preg') ) $ret = preg_quote($ret, '/'); return $ret; } - + /** * Returns list of all backup file dates formatted * in passed block @@ -925,41 +925,44 @@ * @return string * @access public */ - function PrintBackupDates($params) + function PrintBackupDates($params) { - $datearray=$this->getDirList($this->Application->ConfigValue('Backup_Path')); + $datearray = $this->getDirList($this->Application->ConfigValue('Backup_Path')); $ret = ''; foreach($datearray as $key => $value) { - $params['backuptimestamp'] = $value; - $params['backuptime'] = date('F j, Y, g:i a', $value); + $params['backuptimestamp'] = $value['filedate']; + $params['backuptime'] = date('F j, Y, g:i a', $value['filedate']); + $params['backupsize'] = round($value['filesize']/1024/1024, 2); // MBytes $ret .= $this->Application->ParseBlock($params); - } + } return $ret; } - + function getDirList ($dirName) { - $filedates = array(); + $fileinfo = array(); $d = dir($dirName); - + while($entry = $d->read()) { if ($entry != "." && $entry != "..") { if (!is_dir($dirName."/".$entry) && eregi("dump",$entry)) { - $filedate[]=$this->chopchop($entry); + $fileinfo[]= Array('filedate' => $this->chopchop($entry), + 'filesize' => filesize($dirName. '/'. $entry) + ); } } } $d->close(); - rsort($filedate); - - return $filedate; - + rsort($fileinfo); + + return $fileinfo; + } - + function chopchop ($filename) { $p = pathinfo($filename); @@ -968,7 +971,7 @@ $filename= ereg_replace("dump","",$filename); $filename= ereg_replace($ext,"",$filename); return $filename; - } - + } + } ?> \ No newline at end of file