From: Eric Bollengier Date: Wed, 11 Jan 2012 21:21:25 +0000 (+0100) Subject: Adapt bfileview for bvfs tables X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9372cdcf55a6efa54078b37cb015dd9755f5fae5;p=bacula%2Fbacula Adapt bfileview for bvfs tables --- diff --git a/gui/bweb/cgi/bfileview.pl b/gui/bweb/cgi/bfileview.pl index 08816c0932..5ce83404b4 100755 --- a/gui/bweb/cgi/bfileview.pl +++ b/gui/bweb/cgi/bfileview.pl @@ -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 ");