]> git.sur5r.net Git - bacula/bacula/commitdiff
Adapt bfileview for bvfs tables
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 11 Jan 2012 21:21:25 +0000 (22:21 +0100)
committerEric Bollengier <eric@baculasystems.com>
Tue, 17 Jan 2012 13:03:20 +0000 (14:03 +0100)
gui/bweb/cgi/bfileview.pl

index 08816c0932cb194f35a05fc130e8d2ab23c48505..5ce83404b4628990a46b84d2ce7b17a9e1d6ee9e 100755 (executable)
@@ -97,7 +97,7 @@ if (!$r || $r->{ok}) {
     exit 0;    
 } 
 
-$r = $bweb->dbh_selectrow_hashref("SELECT JobId AS ok FROM brestore_knownjobid WHERE JobId = $jobid");
+$r = $bweb->dbh_selectrow_hashref("SELECT JobId AS ok FROM Job WHERE JobId = $jobid AND HasCache=1");
 if (!$r || !$r->{ok}) {                # TODO: compute information
     $bweb->error("Path information for job $jobid has not been updated in the catalog");
     $bweb->display_end();
@@ -261,8 +261,8 @@ sub fv_list_dirs
              ( SELECT Path FROM Path WHERE PathId = P.PathId) AS Path
         FROM (
           SELECT PathId
-            FROM brestore_pathvisibility 
-      INNER JOIN brestore_pathhierarchy USING (PathId)
+            FROM PathVisibility 
+      INNER JOIN PathHierarchy USING (PathId)
            WHERE PPathId  = $rep
              AND JobId = $jobid
              ) AS P
@@ -339,7 +339,7 @@ sub fv_get_size
 
     my $ret = $bweb->dbh_selectrow_hashref("
  SELECT Size AS size
-   FROM brestore_pathvisibility
+   FROM PathVisibility
   WHERE PathId = $rep
     AND JobId = $jobid
 ");
@@ -387,7 +387,7 @@ sub fv_update_size
     my ($jobid, $rep, $size) = @_;
 
     my $nb = $bweb->dbh_do("
- UPDATE brestore_pathvisibility SET Size = $size 
+ UPDATE PathVisibility SET Size = $size 
   WHERE JobId = $jobid 
     AND PathId = $rep 
 ");