}
}
- # convert to Kb
- $total_size = $total_size / 1024;
-
- if ($total_size > $Conf{MaxArchiveSize}) {
+ if (($total_size / 1024) > $Conf{MaxArchiveSize}) {
$cont .= eval( q{ ${h2(Error)}});
$cont .= "Selected backups size $total_size exceed max archive size $Conf{MaxArchiveSize}.";
} else {
dvd_nr,
note,
username,
- date
+ date,
+ total_size
) VALUES (
nextVal('archive_id_seq'),
nextVal('dvd_nr'),
?,
?,
- NOW()
+ NOW(),
+ ?
)
});
# FIXME insert user here
- $sth->execute($In{'note'}, 'dummy_user');
+ $sth->execute($In{'note'}, 'dummy_user', $total_size);
foreach my $backup_id (@selected_backup_ids) {
Archived following backups:
} . join(", ", @selected_backup_ids) . q{
<br/>with total size of
- <b>} . sprintf("%1.2f Mb", $total_size / 1024) . q{</b>
+ <b>} . sprintf("%1.2f Mb", $total_size / 1024 / 1024) . q{</b>
to media <b>} . $dvd_nr . q{</b>
with following message:
<div style="background-color: #e0e0e0; display: inline; padding: 2px;">