diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2010-12-16 22:56:35 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2010-12-16 22:56:35 -0500 |
commit | b57b80cc8a9e0394a07a4a7becbeb42f2b9ec344 (patch) | |
tree | 6fde4570a8aa59f4afbfc286357be648c8edbc5c /GradeBook.tcl | |
parent | 89172be4283ddd9f249973ba26b8a7f88a0412a6 (diff) | |
download | GradeBook-b57b80cc8a9e0394a07a4a7becbeb42f2b9ec344.tar.gz GradeBook-b57b80cc8a9e0394a07a4a7becbeb42f2b9ec344.zip |
simplified array existance check
darcs-hash:20101217035635-067c0-e900c7a6b50fa985597c720e29adf504d8d6180f.gz
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-x | GradeBook.tcl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index f0fedf5..7f396bb 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -287,8 +287,7 @@ proc AccessGroupRights {db user password } { set PasswordHash [::md5::md5 -hex $password] set eval_str [list SELECT GroupName FROM PasswordsTable WHERE UserName='$user' AND PasswordHash='$PasswordHash'] db eval $eval_str group_name_array {} - set name_found [array names group_name_array -exact GroupName] - if { $name_found != ""} { + if { [ info exist group_name_array(GroupName) ] } { set group $group_name_array(GroupName); } else { set group guest |