Update of /cvsroot/sandweb/sandweb/bin
In directory usw-pr-cvs1:/tmp/cvs-serv27826/bin
Modified Files:
sandweb.cgi
Log Message:
* removed "edit" button from view_file page if file is non-text, it's
useless and could easily cause stupid user-induced problems
* view_file now uses POST form to send file to edit_file, and edit_file
uses POST to save it. This way we don't get "URI too long" errors from
Apache ( and other web servers too, I'd imagine ).
Index: sandweb.cgi
===================================================================
RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v
retrieving revision 1.119
retrieving revision 1.120
diff -U2 -r1.119 -r1.120
--- sandweb.cgi 2002/01/19 22:15:21 1.119
+++ sandweb.cgi 2002/01/19 22:38:48 1.120
@@ -490,4 +490,5 @@
my $data = $file->file_read();
+ my $edit = "";
if ( $file->get_file_type() ne "Text" ) {
@@ -495,4 +496,6 @@
set_error("This does not appear to be a text file.");
$data = "";
+ } else {
+ $edit = '<input type="submit" name="file_command" value="edit" />';
}
@@ -502,4 +505,5 @@
FILENAME => "$filename",
LOCATION => "$location",
+ EDIT => "$edit",
DATA => "$data",
);
|