Update of /cvsroot/sandweb/sandweb/lib/SandWeb
In directory usw-pr-cvs1:/tmp/cvs-serv2483/lib/SandWeb
Modified Files:
Browse.pm
Log Message:
changed "location" to "path" and "browse_menu" to
"browse_repository_menu" to make room for new "browse_menu" to support
multiple repositories on Hack SandWeb Dat
Index: Browse.pm
===================================================================
RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -U2 -r1.30 -r1.31
--- Browse.pm 2002/01/26 22:12:24 1.30
+++ Browse.pm 2002/01/26 23:27:59 1.31
@@ -32,5 +32,5 @@
sub browse {
my $self = shift;
- my $path = shift;
+ my $location = shift;
my $progname = shift;
my $vcs_commands = shift;
@@ -56,13 +56,12 @@
my $location;
- if ($path eq '/') {
- $path = '';
+ if ($location eq '/') {
+ $location = '';
}
- if ($path) {
+ if ($location) {
# Security check, no "/.." or "../" allowed mister!
- $path =~ s:/\.\.::g;
- $path =~ s:\.\./::g;
- $location = $path;
+ $location =~ s:/\.\.::g;
+ $location =~ s:\.\./::g;
} else {
$location = '/';
@@ -106,8 +105,8 @@
- if ( opendir(SANDBOX, "$sandbox/$path") ) {
- $log->debug("Opened folder : $sandbox/$path");
+ if ( opendir(SANDBOX, "$sandbox/$location") ) {
+ $log->debug("Opened folder : $sandbox/$location");
} else {
- $log->debug("Cannot open folder $sandbox/$path : $!");
+ $log->debug("Cannot open folder $sandbox/$location : $!");
}
my @entries = readdir(SANDBOX);
@@ -127,5 +126,5 @@
my $entryname = $row_data{ENTRY};
my $file = SandWeb::File->new(
- location => "$sandbox/$path",
+ location => "$sandbox/$location",
filename => "$entryname",
);
@@ -138,5 +137,5 @@
}
$row_data{FILETYPE} = "dir";
- $row_data{LINK} = "action=browse_menu&path=$path/$filename";
+ $row_data{LINK} = "action=browse_menu&location=$location/$filename";
if ($counter eq "0") {
$row_data{COLOR} = "$color0";
|