Update of /cvsroot/sandweb/sandweb/bin
In directory usw-pr-cvs1:/tmp/cvs-serv11642/bin
Modified Files:
sandweb.cgi
Log Message:
cleaned up code a little, plus got rid of a -w warning
Index: sandweb.cgi
===================================================================
RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v
retrieving revision 1.116
retrieving revision 1.117
diff -U2 -r1.116 -r1.117
--- sandweb.cgi 2002/01/18 21:14:44 1.116
+++ sandweb.cgi 2002/01/19 21:17:41 1.117
@@ -55,5 +55,7 @@
sub main {
- if (CGI::param('action') eq 'login') {
+ my $action = CGI::param('action');
+
+ if ($action eq 'login') {
# attempting login
my $username = CGI::param('username');
@@ -86,5 +88,5 @@
#############################
#
- unless (CGI::param('action')) {
+ unless ($action) {
# with cookie, default is main_menu
main_menu( cookie => $cookie );
@@ -103,13 +105,13 @@
- if ( CGI::param('action') eq 'main_menu' ) {
+ if ( $action eq 'main_menu' ) {
# called main menu
main_menu( cookie => $cookie );
}
- elsif ( CGI::param('action') eq 'debug_menu' ) {
+ elsif ( $action eq 'debug_menu' ) {
# called test menu
debug_menu( cookie => $cookie );
}
- elsif ( CGI::param('action') eq 'preferences_menu' ) {
+ elsif ( $action eq 'preferences_menu' ) {
if (! CGI::param('Submit')) {
# call preferences menu
@@ -121,16 +123,20 @@
}
}
- elsif ( CGI::param('action') eq 'logout' ) {
+ elsif ( $action eq 'logout' ) {
# called logout
logout();
}
- elsif ( CGI::param('action') eq 'browse_menu' ) {
+ elsif ( $action eq 'browse_menu' ) {
# called sandbox viewer
+ my $path = CGI::param('path');
+ unless ($path) {
+ $path = "";
+ }
browse_menu(
cookie => $cookie,
- path => CGI::param('path'),
+ path => $path,
);
}
- elsif ( CGI::param('action') eq 'file' ) {
+ elsif ( $action eq 'file' ) {
# called file manipulator
my @filename = ();
@@ -143,5 +149,5 @@
);
}
- elsif ( CGI::param('action') eq 'vcsaction' ) {
+ elsif ( $action eq 'vcsaction' ) {
# called VCS action
my @filename = ();
@@ -160,5 +166,5 @@
);
}
- elsif ( CGI::param('action') eq 'vcs_prefs_menu' ) {
+ elsif ( $action eq 'vcs_prefs_menu' ) {
# called VCS preferences
vcs_prefs_menu(
@@ -171,5 +177,5 @@
else {
# called an invalid page
- my $page = CGI::param('action');
+ my $page = $action;
my $msg = "Invalid page - $page!";
$log->error("$msg");
|