Update of /cvsroot/sandweb/sandweb/bin
In directory usw-pr-cvs1:/tmp/cvs-serv19885/bin
Modified Files:
sandweb.cgi
Log Message:
edit works now
fixed location bugs in Browse.pm
Index: sandweb.cgi
===================================================================
RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v
retrieving revision 1.72
retrieving revision 1.73
diff -U2 -r1.72 -r1.73
--- sandweb.cgi 2001/11/24 11:58:00 1.72
+++ sandweb.cgi 2001/11/24 13:20:42 1.73
@@ -351,5 +351,5 @@
print $return{'output'};
print '</pre>';
- exit 1;
+ exit 0;
}
elsif ( $command eq 'view' ) {
@@ -360,5 +360,5 @@
}
}
- unless ( $file->get_file_type() eq "Text" ) {
+ unless ( $file->get_filetype() eq "Binary" ) {
$error = "This does not appear to be a text file.";
}
@@ -391,5 +391,5 @@
}
}
- unless ( $file->get_file_type() eq "Text" ) {
+ if ( $file->get_file_type() eq "Binary" ) {
$error = "This does not appear to be a text file.";
}
@@ -402,4 +402,7 @@
PROGNAME => $progname,
CONTENT => "@tmp",
+ FILENAME => $filename,
+ LOCATION => $location,
+ FULLPATH => "$users_dir/$username/$location",
);
@@ -415,4 +418,17 @@
exit 0;
}
+ elsif ( $command eq 'edited_file' ) {
+ my $data = param('data'),
+ my $filename = $file->get_filename();
+
+ open ( FILE, "> $users_dir/$username$filename" );
+ print FILE "$data";
+ close FILE;
+
+ browse_menu(
+ cookie => $cookie,
+ path => $location,
+ );
+ }
elsif ( $command eq 'create_file' ) {
my $content = $ui->create_file(
@@ -501,5 +517,9 @@
}
else {
- $error = "Invalid selection.";
+ $error = "Invalid selection: $command";
+ browse_menu(
+ cookie => $cookie,
+ path => $location,
+ );
}
}
@@ -544,5 +564,5 @@
print "$return{'output'}\n";
print '</pre>';
- exit 1;
+ exit 0;
}
|