Update of /cvsroot/sandweb/sandweb/bin
In directory usw-pr-cvs1:/tmp/cvs-serv14037/bin
Modified Files:
sandweb.cgi
Log Message:
explicitly uses header as CGI::header, also made login incorrect and
invalid cookie messages more user friendly
Index: sandweb.cgi
===================================================================
RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v
retrieving revision 1.117
retrieving revision 1.118
diff -U2 -r1.117 -r1.118
--- sandweb.cgi 2002/01/19 21:17:41 1.117
+++ sandweb.cgi 2002/01/19 21:28:51 1.118
@@ -76,5 +76,5 @@
unless ($stat) {
# unable to load user with cookie, or cookie expired
- set_error("unable to get cookie");
+ set_error("Please login first.");
$log->debug("unable to get valid cookie: '$cookie'");
login_menu();
@@ -168,9 +168,21 @@
elsif ( $action eq 'vcs_prefs_menu' ) {
# called VCS preferences
+ my $filename = CGI::param('filename');
+ unless ($filename) {
+ $filename = "";
+ }
+ my $command = CGI::param('command');
+ unless ($command) {
+ $command = "";
+ }
+ my $location = CGI::param('location');
+ unless ($location) {
+ $location = "";
+ }
vcs_prefs_menu(
cookie => $cookie,
- filename => CGI::param('filename'),
- command => CGI::param('command'),
- location => CGI::param('location'),
+ filename => $filename,
+ command => $command,
+ location => $location,
);
}
@@ -211,5 +223,5 @@
);
- print header;
+ print CGI::header;
$ui->print_screen(
TITLE => 'SandWeb : Login',
@@ -241,5 +253,5 @@
$log->debug("cookie: '$cookie'");
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Main Menu',
@@ -269,5 +281,5 @@
$content = "Data Dump<br /><pre>" . $content . "</pre>";
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Debug Menu',
@@ -356,5 +368,5 @@
my $content = $browse->browse("$path", "$progname", "@vcs_commands", "@file_commands", $repo_type);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Browse Menu',
@@ -493,5 +505,5 @@
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : View File',
@@ -551,5 +563,5 @@
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Edit File',
@@ -580,5 +592,5 @@
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Create File',
@@ -607,5 +619,5 @@
FULLPATH => "$users_dir/$username/$location",
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE => 'SandWeb : Create Folder',
@@ -641,5 +653,5 @@
FULLPATH => "$users_dir/$username/$location",
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Upload File',
@@ -659,5 +671,5 @@
FULLPATH => "$users_dir/$username/$location",
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Checkout',
@@ -756,5 +768,5 @@
VCS_ERROR => "@vcs_error",
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> "SandWeb : VCS $vcs_command",
@@ -774,5 +786,5 @@
FILENAME => "@filename",
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Commit',
@@ -806,5 +818,5 @@
VCS_ERROR => "@vcs_error",
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> "SandWeb : VCS $vcs_command",
@@ -840,5 +852,5 @@
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Preferences Menu',
@@ -922,5 +934,5 @@
);
- print header( -cookie => $cookie );
+ print CGI::header( -cookie => $cookie );
$ui->print_screen(
TITLE=> 'SandWeb : Preferences Menu',
@@ -1051,5 +1063,5 @@
else {
$log->standard("Invalid login attempt, username: $username");
- set_error("Login incorrect!");
+ set_error("Login incorrect, please try again.");
login_menu();
}
|