]> git.sur5r.net Git - bacula/bacula/commitdiff
Permit to filter on the directory name as for file
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 23 Jul 2009 14:28:40 +0000 (14:28 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 22 Sep 2009 09:01:30 +0000 (11:01 +0200)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9092 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/cgi/bresto.pl
gui/bweb/technotes-3.0

index a22d0a82e1de04b7a903db20b7a3c7a152f2702a..c23e349a3937ea1d9300df4544890caf24966faa 100755 (executable)
@@ -453,6 +453,11 @@ sub ls_dirs
 
     my $pathid = $self->{cwdid};
     my $jobclause = $self->{curjobids};
+    my $filter ='';
+
+    if ($self->{pattern}) {
+        $filter = " AND Path2.Path $self->{sql}->{MATCH} $self->{pattern} ";
+    }
 
     # Let's retrieve the list of the visible dirs in this dir ...
     # First, I need the empty filenameid to locate efficiently
@@ -473,7 +478,9 @@ SELECT PathId, Path, JobId, Lstat FROM (
        JOIN brestore_pathvisibility AS brestore_pathvisibility1
            ON (brestore_pathhierarchy1.PathId = brestore_pathvisibility1.PathId)
        WHERE brestore_pathhierarchy1.PPathId = $pathid
-       AND brestore_pathvisibility1.jobid IN ($jobclause)) AS listpath1
+       AND brestore_pathvisibility1.jobid IN ($jobclause)
+           $limit
+     ) AS listpath1
    JOIN Path AS Path1 ON (listpath1.PathId = Path1.PathId)
 
    LEFT JOIN ( -- get attributes if any
index 339870c129bd0e6706f9a0ac1ab8987be62e27bb..6488330f42d27788341e07401a6091a66d5aec80 100644 (file)
@@ -1,3 +1,5 @@
+23Jul09
+ebl  Permit to filter on the directory name as for file
 17Jul09
 ebl  Optimize a bit the running job view
 ebl  Fix bresto relocation box