From 13b2de6ef92080345a97e88837146eb06a322e34 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Mon, 30 Jan 2012 11:06:51 -0500 Subject: empty database or user reassigned to special bogus names --- GradeBook.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'GradeBook.tcl') 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 "" - 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 } -- cgit v1.2.3