SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
2.0.0beta0 patch for CGI browse bug
Author Message
Post 2.0.0beta0 patch for CGI browse bug 
Hello Craig ... some testing

it seems that it happens only at "second-level-DIRs" (root=3D"first-level")
and only after the first click to such "second-level-DIR".

1. After this first click ... all "second-level-DIR-Links" are wrong.

2. You can browse the complete tree fine, but don=B4t touch the=20
"second-level-DIRs".

3. A click to the / (root) resets the behavior. (? it is a slash itself=20
?!)

Thanks for the info. Here's a patch for this bug.

Craig

--- BackupPC_Admin Sun Feb 23 17:46:06 2003
+++ BackupPC_Admin.new Sat Mar 8 13:00:34 2003
< at > < at > -579,6 +579,7 < at > < at >
ErrorExit(eval("qq{$Lang->{Directory___EscHTML}}"));
}
}
+ $dir = "/$dir" if ( $dir !~ /^\// );
my $relDir = $dir;
my $currDir = undef;

< at > < at > -605,7 +606,7 < at > < at >
my $fURI = $f; # URI escaped $f
my $shareURI = $share; # URI escaped $share
if ( $relDir eq "" ) {
- $path = $f;
+ $path = "/$f";
} else {
($path = "$relDir/$f") =~ s{//+}{/}g;
}
< at > < at > -719,12 +720,12 < at > < at >
# Prune the last directory off $relDir, or at the very end
# do the top-level directory.
#
- if ( $relDir eq "" || $relDir eq "/" ) {
+ if ( $relDir eq "" || $relDir eq "/" || $relDir !~ /(.*)\/(.*)/ ) {
$currDir = $share;
$share = "";
$relDir = "";
} else {
- $relDir =~ s/(.*)\/(.*)/$1/;
+ $relDir = $1;
$currDir = $2;
}
}

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB