From f1b619b584e9f665390e14e46f5e89e3390088df Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Fri, 5 Dec 2014 14:03:15 -0500 Subject: bug fix: wrong defaults for cgi variable host_name, comments fixed too --- GradeBook.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'GradeBook.tcl') diff --git a/GradeBook.tcl b/GradeBook.tcl index 6bd6b52..00a0f67 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -49,11 +49,12 @@ set action [::ncgi::value action defaultview] # get remote IP if { [catch {set remote_ip $env(REMOTE_ADDR)} errStat] } { set remote_ip unknown} # get hostname -if { [catch {set host_name $env(SERVER_NAME)} errStat] } { set request_uri unknown} -# script uri +if { [catch {set host_name $env(SERVER_NAME)} errStat] } { set host_name unknown} +# script name if { [catch {set script_name $env(SCRIPT_NAME)} errStat] } { set script_name unknown} set script_root_name $script_name # figure out course db filename +# script uri if { [catch {set request_uri $env(REQUEST_URI)} errStat] } { set request_uri unknown} regsub -all $script_name $request_uri "" coursedbfname regsub -all {\?.*$} $coursedbfname "" coursedbfname -- cgit v1.2.3