diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-01-30 11:06:51 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2012-01-30 11:06:51 -0500 |
commit | 13b2de6ef92080345a97e88837146eb06a322e34 (patch) | |
tree | f43fb10c236b8e3c7b9f4c4fe15ffab070f88591 | |
parent | f945337d45c4ac422b8d72292a30bc98a640a932 (diff) | |
download | GradeBook-13b2de6ef92080345a97e88837146eb06a322e34.tar.gz GradeBook-13b2de6ef92080345a97e88837146eb06a322e34.zip |
empty database or user reassigned to special bogus names
-rwxr-xr-x | GradeBook.tcl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index fdc3dd0..91b4df4 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -40,6 +40,7 @@ set action defaultview # read cookies set user_requested [::ncgi::cookie user] +if { $user_requested eq "" } { set user_requested __user_not_set__ } set sortCol [::ncgi::cookie sortCol] set password [::ncgi::cookie password] set action [::ncgi::value action defaultview] @@ -55,6 +56,7 @@ if { [catch {set request_uri $env(REQUEST_URI)} errStat] } { set request_uri unk regsub -all $script_name $request_uri "" coursedbfname regsub -all {\?.*$} $coursedbfname "" coursedbfname regsub -all {^/} $coursedbfname "" coursedbfname +if { $coursedbfname eq "" } { set coursedbfname __DB_not_set__ } set script_name "$script_name/$coursedbfname" @@ -89,7 +91,7 @@ if { [file exists $dbfile] && ("$coursedbfname" ne "") } { htmlHeaderDBSelector set permission_list [list GroupName guest] puts "<body>" - if { "$coursedbfname" ne "" } { + if { "$coursedbfname" ne "__DB_not_set__" } { htmlErrorMsg "No requested database {$coursedbfname}. Please, check your url" dbg "Attemt to access non existing database: {$dbfile}" msg_level_info } |