47 |
} |
} |
48 |
} |
} |
49 |
|
|
50 |
|
if (($total_size / 1024) > $Conf{MaxArchiveSize}) { |
|
if ($total_size > $Conf{MaxArchiveSize}) { |
|
51 |
$cont .= eval( q{ ${h2(Error)}}); |
$cont .= eval( q{ ${h2(Error)}}); |
52 |
$cont .= "Selected backups exceed max archive size."; |
$cont .= "Selected backups size $total_size exceed max archive size $Conf{MaxArchiveSize}."; |
53 |
} else { |
} else { |
54 |
|
|
55 |
# create new archive |
# create new archive |
59 |
dvd_nr, |
dvd_nr, |
60 |
note, |
note, |
61 |
username, |
username, |
62 |
date |
date, |
63 |
|
total_size |
64 |
) VALUES ( |
) VALUES ( |
65 |
nextVal('archive_id_seq'), |
nextVal('archive_id_seq'), |
66 |
nextVal('dvd_nr'), |
nextVal('dvd_nr'), |
67 |
?, |
?, |
68 |
?, |
?, |
69 |
NOW() |
NOW(), |
70 |
|
? |
71 |
) |
) |
72 |
}); |
}); |
73 |
|
|
74 |
# FIXME insert user here |
# FIXME insert user here |
75 |
$sth->execute($In{'note'}, 'dummy_user'); |
$sth->execute($In{'note'}, 'dummy_user', $total_size); |
76 |
|
|
77 |
foreach my $backup_id (@selected_backup_ids) { |
foreach my $backup_id (@selected_backup_ids) { |
78 |
|
|
103 |
Archived following backups: |
Archived following backups: |
104 |
} . join(", ", @selected_backup_ids) . q{ |
} . join(", ", @selected_backup_ids) . q{ |
105 |
<br/>with total size of |
<br/>with total size of |
106 |
<b>} . sprintf("%1.2f Mb", $total_size / 1024) . q{</b> |
<b>} . sprintf("%1.2f Mb", $total_size / 1024 / 1024) . q{</b> |
107 |
to media <b>} . $dvd_nr . q{</b> |
to media <b>} . $dvd_nr . q{</b> |
108 |
with following message: |
with following message: |
109 |
<div style="background-color: #e0e0e0; display: inline; padding: 2px;"> |
<div style="background-color: #e0e0e0; display: inline; padding: 2px;"> |