ArchiveMediaSize and ArchiveChunkSize from _search_archive config
[BackupPC.git] / lib / BackupPC / CGI / BurnMedia.pm
index 1dc83a1..bf4dfaf 100644 (file)
@@ -4,10 +4,7 @@ use strict;
 use BackupPC::CGI::Lib qw(:all);
 use BackupPC::Search;
 use Data::Dumper;
 use BackupPC::CGI::Lib qw(:all);
 use BackupPC::Search;
 use Data::Dumper;
-use vars qw($Cgi %In $MyURL $User %Conf $TopDir $BinDir $bpc);
-
-my $dsn = $Conf{SearchDSN};
-my $db_user = $Conf{SearchUser} || '';
+use vars qw($Cgi %In $MyURL $User $TopDir $BinDir $bpc);
 
 sub action() {
        my $cont = "";
 
 sub action() {
        my $cont = "";
@@ -15,7 +12,10 @@ sub action() {
        my $subtitle;
        my @files;
 
        my $subtitle;
        my @files;
 
-       my $dbh = DBI->connect($dsn, $db_user, "", { RaiseError => 1, AutoCommit => 0 } );
+       $bpc->ConfigRead('_search_archive');
+       my %Conf = $bpc->Conf;
+
+       my $dbh = DBI->connect($Conf{SearchDSN}, $Conf{SearchUser}, "", { RaiseError => 1, AutoCommit => 0 } );
 
        BackupPC::CGI::Lib::NewRequest();
 #      $cont = Dumper(%In);
 
        BackupPC::CGI::Lib::NewRequest();
 #      $cont = Dumper(%In);