added SearchHideShare regex to config
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 17 Feb 2011 10:25:10 +0000 (11:25 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 17 Feb 2011 10:25:10 +0000 (11:25 +0100)
README.ASA
conf/pc/_search_archive.pl
lib/BackupPC/Search.pm

index a1f28a2..24c8bac 100644 (file)
@@ -113,5 +113,7 @@ $Conf{ArchivePostUserCmd} = '/srv/BackupPC/bin/BackupPC_ASA_PostArchive_Update -
 # Logging verbosity:
 $Conf{XferLogLevel} = 1;
 
+# Hide share names from search inferace
+$Conf{SearchHideShare} = 'rsync';
 
 
index 8483453..55ceb5a 100644 (file)
@@ -59,5 +59,7 @@ $Conf{ArchivePostUserCmd} = '/srv/BackupPC/bin/BackupPC_ASA_PostArchive_Update -
 # Logging verbosity:
 $Conf{XferLogLevel} = 1;
 
+# Hide share names from search inferace
+$Conf{SearchHideShare} = 'rsync';
 
 
index d09c7e3..1c3007f 100644 (file)
@@ -61,6 +61,9 @@ sub getShares {
        push @ret, { 'id' => '', 'share' => '-'};       # dummy any
 
        while ( my $row = $sth->fetchrow_hashref() ) {
+               if ( my $hide = $Conf{SearchHideShare} ) {
+                       next if $row->{share} =~ m/$hide/;
+               }
                push @ret, $row;
        }
        return @ret;