my $bweb = new Bweb(info => $conf);
$bweb->connect_db();
-my $arg = $bweb->get_form('where', 'jobid');
+my $arg = $bweb->get_form('where', 'jobid', 'pathid');
my $where = $arg->{where};
my $jobid = $arg->{jobid};
+my $pathid = $arg->{pathid};
my $jobid_url = "jobid=$jobid";
my $opt_level = 2 ;
my $max_file = 20;
$bweb->display_begin();
$bweb->display_job_zoom($jobid);
-unless ($where and $jobid) {
+unless (($where or $pathid) and $jobid) {
$bweb->error("Can't get where or jobid");
exit 0;
}
$bweb->display_end();
exit 0;
}
-
+
my $attribs = fv_get_file_attribute($jobid, $where);
if ($attribs->{found}) {
$bweb->display($attribs, 'fv_file_attribs.tpl');
$where = $where . "/" ;
}
-my $root = fv_get_root_pathid($where);
+my $root;
+
+if ($pathid and $where) {
+ $root = $pathid;
+} else {
+ $root = fv_get_root_pathid($where);
+}
+
if (!$root) {
$bweb->error("Can't find $where in catalog");
$bweb->display_end();
my $url_action = "bfileview.pl?opt_level=$opt_level" ;
my $top = new CCircle(
display_other => 1,
- base_url => "$url_action;$jobid_url;where=$where",
+ base_url => "$url_action;pathid=$root;$jobid_url;where=$where",
) ;
fv_display_rep($top, $total, $root, $opt_level) ;
. sprintf(' %.0f%% ', $per)
. Bweb::human_size($size)
) ;
-
- if ($chld and $level > 0) {
- fv_display_rep($chld, $size, $dir->[0], $level - 1) ;
+
+ if ($chld) { # use pathid instead of where (for accents)
+ $chld->{base_url} =~ s/pathid=$rep;/pathid=$dir->[0];/;
+
+ if ($level > 0) {
+ fv_display_rep($chld, $size, $dir->[0], $level - 1) ;
+ }
}
}