Mercurial > hg > egg-tcls
comparison tj.tcl @ 630:b7e3a47ed072
tj: Add few comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 Feb 2021 16:23:45 +0200 |
parents | eaf766018133 |
children | 9596cd122639 |
comparison
equal
deleted
inserted
replaced
629:62cf145b67f8 | 630:b7e3a47ed072 |
---|---|
466 if {![utl_arg_get $rarglist rindex rarg 0] || ![tj_get_id $rarg rindex uid]} { | 466 if {![utl_arg_get $rarglist rindex rarg 0] || ![tj_get_id $rarg rindex uid]} { |
467 tj_msg $upublic $unick $uchan "help_default" | 467 tj_msg $upublic $unick $uchan "help_default" |
468 return 1 | 468 return 1 |
469 } | 469 } |
470 | 470 |
471 # If empty, clear to global default id | |
471 if {$uid == "" || $uid == "{}" || $uid == "*"} { | 472 if {$uid == "" || $uid == "{}" || $uid == "*"} { |
472 set uid $tj_default_id | 473 set uid $tj_default_id |
473 } else { | 474 } else { |
475 # Check if a TJ exists with this id? | |
474 set usql "SELECT COUNT(*) FROM tj WHERE uuser='[utl_escape $uhand]' AND uid='[utl_escape $uid]'" | 476 set usql "SELECT COUNT(*) FROM tj WHERE uuser='[utl_escape $uhand]' AND uid='[utl_escape $uid]'" |
475 if {[catch {set nids [tj_dbh onecolumn $usql]} uerrmsg]} { | 477 if {[catch {set nids [tj_dbh onecolumn $usql]} uerrmsg]} { |
476 tj_msg $upublic $unick $uchan "err_sql" [list $uerrmsg] | 478 tj_msg $upublic $unick $uchan "err_sql" [list $uerrmsg] |
477 tj_log "$uerrmsg on SQL:\n$usql" | 479 tj_log "$uerrmsg on SQL:\n$usql" |
478 return 1 | 480 return 1 |