Merge branch 'search-3.2.0' of git.rot13.org:/git/BackupPC into search-3.2.0
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 7 Feb 2011 10:53:32 +0000 (10:53 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 7 Feb 2011 10:53:32 +0000 (10:53 +0000)
bin/BackupPC_ASA_ArchiveStart
bin/BackupPC_ASA_BurnArchiveMedia
bin/BackupPC_ASA_PostArchive_Update
bin/BackupPC_ASA_SearchUpdate
lib/BackupPC/CGI/Lib.pm
lib/BackupPC/Search.pm

index f91a60f..da3ef77 100755 (executable)
@@ -100,6 +100,7 @@ my(@HostList, @BackupList);
 my $host_nums;
 
 foreach my $host ( keys %$Hosts ) {
+       $host = lc $host;
        my @backups = $bpc->BackupInfoRead($host);
        if ( !@backups ) {
                warn "$0: host $host doesn't have any backups... skipping\n";
index 2643918..912e00f 100755 (executable)
@@ -15,7 +15,7 @@ use File::Path;
 use Cwd qw/abs_path/;
 use Data::Dumper;
 
-my $debug = $ENV{DEBUG} || 1;
+my $debug = $ENV{DEBUG} || 0;
 # set this to 1 to prompt for DVD removal for each selected item.
 my $prompt_for_delete = shift @ARGV;
 $|=1;
index 1dea094..e70bfb1 100755 (executable)
@@ -375,7 +375,7 @@ sub check_archive {
 
 foreach ( 0 .. $#{ $opt->host } ) {
 
-       my $host = $opt->host->[$_];
+       my $host = lc $opt->host->[$_];
        my $num  = $opt->num->[$_];
 
        if ( ! $opt->ok ) {
index de465b7..ba499f9 100755 (executable)
@@ -312,14 +312,15 @@ my $host_nr = 0;
 foreach my $host_key (@hosts) {
 
        my $hostname = $hosts->{$host_key}->{'host'} || die "can't find host for $host_key";
+       $hostname = lc $hostname;
 
-       next if $opt->host && ! grep { m/^$hostname$/ } @{ $opt->host };
+       next if $opt->host && ! grep { m/^$hostname$/i } @{ $opt->host };
 
        $sth->{hosts_by_name}->execute($hostname);
 
        unless (($hostID) = $sth->{hosts_by_name}->fetchrow_array()) {
                $sth->{insert_hosts}->execute(
-                       $hosts->{$host_key}->{'host'},
+                       $hostname,
                        $hosts->{$host_key}->{'ip'}
                );
 
index 26aee2a..9861acc 100644 (file)
@@ -466,7 +466,10 @@ sub Header
 $Conf{CgiHeaders}
 <script src="$Conf{CgiImageDirURL}/sorttable.js"></script>
 </head><body onLoad="document.getElementById('NavMenu').style.height=document.body.scrollHeight">
+<!--
 <a href="http://backuppc.sourceforge.net"><img src="$Conf{CgiImageDirURL}/logo.gif" hspace="5" vspace="7" border="0"></a><br>
+-->
+<img src="/asa-150x50.png" hspace="5" vspace="7">
 EOF
 
     if ( defined($Hosts) && defined($host) && defined($Hosts->{$host}) ) {
index cbd8c84..38837c0 100644 (file)
@@ -32,7 +32,7 @@ sub search_module {
        if ( $@ ) {
                warn "ERROR: $search_module: $!";
        } else {
-               warn "# using $search_module for full-text search";
+               #warn "# using $search_module for full-text search";
        }
 
        return $search_module->new( %Conf );