}
}
- # create new archive
- my $sth = $dbh->prepare(q{
- INSERT INTO archive (
- id,
- dvd_nr,
- note,
- username,
- date
- ) VALUES (
- nextVal('archive_id_seq'),
- nextVal('dvd_nr'),
- ?,
- ?,
- NOW()
- )
- });
-
- # FIXME insert user here
- $sth->execute($In{'note'}, 'dummy_user');
if ($total_size > $Conf{MaxArchiveSize}) {
$cont .= eval( q{ ${h2(Error)}});
$cont .= "Selected backups exceed max archive size.";
} else {
+ # create new archive
+ my $sth = $dbh->prepare(q{
+ INSERT INTO archive (
+ id,
+ dvd_nr,
+ note,
+ username,
+ date
+ ) VALUES (
+ nextVal('archive_id_seq'),
+ nextVal('dvd_nr'),
+ ?,
+ ?,
+ NOW()
+ )
+ });
+
+ # FIXME insert user here
+ $sth->execute($In{'note'}, 'dummy_user');
foreach my $backup_id (@selected_backup_ids) {