47 |
} |
} |
48 |
} |
} |
49 |
|
|
|
# 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'); |
|
50 |
|
|
51 |
if ($total_size > $Conf{MaxArchiveSize}) { |
if ($total_size > $Conf{MaxArchiveSize}) { |
52 |
$cont .= eval( q{ ${h2(Error)}}); |
$cont .= eval( q{ ${h2(Error)}}); |
53 |
$cont .= "Selected backups exceed max archive size."; |
$cont .= "Selected backups exceed max archive size."; |
54 |
} else { |
} else { |
55 |
|
|
56 |
|
# create new archive |
57 |
|
my $sth = $dbh->prepare(q{ |
58 |
|
INSERT INTO archive ( |
59 |
|
id, |
60 |
|
dvd_nr, |
61 |
|
note, |
62 |
|
username, |
63 |
|
date |
64 |
|
) VALUES ( |
65 |
|
nextVal('archive_id_seq'), |
66 |
|
nextVal('dvd_nr'), |
67 |
|
?, |
68 |
|
?, |
69 |
|
NOW() |
70 |
|
) |
71 |
|
}); |
72 |
|
|
73 |
|
# FIXME insert user here |
74 |
|
$sth->execute($In{'note'}, 'dummy_user'); |
75 |
|
|
76 |
foreach my $backup_id (@selected_backup_ids) { |
foreach my $backup_id (@selected_backup_ids) { |
77 |
|
|