From: <si...@us...> - 2011-12-15 16:46:54
|
Revision: 2128 http://yaacs.svn.sourceforge.net/yaacs/?rev=2128&view=rev Author: sickpig Date: 2011-12-15 16:46:47 +0000 (Thu, 15 Dec 2011) Log Message: ----------- * FIX assorted syntax error spotted by Nagelfar - A Tcl Syntax checker :) http://nagelfar.berlios.de/ Modified Paths: -------------- trunk/yaacs/admin.tcl trunk/yadmin.tcl Modified: trunk/yaacs/admin.tcl =================================================================== --- trunk/yaacs/admin.tcl 2011-12-15 16:00:17 UTC (rev 2127) +++ trunk/yaacs/admin.tcl 2011-12-15 16:46:47 UTC (rev 2128) @@ -546,7 +546,7 @@ if {[string length $dial_prefix] == 0} { ::yalog::debug "you must supply a a voip provider for the project" - return $i::admin::ERR_VOIP + return $::admin::ERR_VOIP } #if no table name has been supplied, set it to project's name (lower case) @@ -1485,8 +1485,8 @@ } append auxT projects. $pjname _theo - set fileds [list cod_prov label qty_capo qty_not_capo done_capo done_not_capo] - set sort [list cod_prov] + set fields [list cod_prov label qty_capo qty_not_capo done_capo done_not_capo] + set sorts [list cod_prov] set res [::admin::quotaFillIn $db $auxT $fields $sorts] return $res @@ -2275,7 +2275,7 @@ set my_dest_table $dataPj(pjtable) } if {[::yadb::execl $db "insert into $my_dest_table select * from $tmpt"] == -1} { - ::yalog::error "db error occurs while copyng new contacts on $pjtable" + ::yalog::error "db error occurs while copyng new contacts into $my_dest_table " return -1 } @@ -2393,9 +2393,8 @@ # # @param ce choose if you want to create (0) or edit (1) a turn # @param db database connection handler -# @param name provider's name -# @param dp provider's dial prefix -# @param idep [optional] email account's id on db. Use it to edit a turn. +# @param new provider's data +# @param idea [optional] email account's id on db. Use it to edit an email account settings. # @return return 0 on success, -1 on generic error, ERR_UNAME for not unique # or null name. If you set ce to # somewhat other than its legal values you'll get an ERR_FLAG. Remember @@ -2472,13 +2471,6 @@ return -1 } - # update all the projects that use that dial_prefix - set sql "update projects.projects set email_account=$idep where dial_prefix=$old_idep" - if {[::yadb::execl $db $sql] == -1} { - ::yalog::error "failed to update email account id for associated projects" - ::yadb::execl $db "rollback" - return -1 - } ::yadb::execl $db "commit" } Modified: trunk/yadmin.tcl =================================================================== --- trunk/yadmin.tcl 2011-12-15 16:00:17 UTC (rev 2127) +++ trunk/yadmin.tcl 2011-12-15 16:46:47 UTC (rev 2128) @@ -32,7 +32,7 @@ namespace import msgcat::* -mcload [file join $yaacs::library msgs] +mcload [file join $::yaacs::library msgs] option add *Dialog.msg.font {lucidasans 16} bind Button <Return> {%W invoke} @@ -668,8 +668,8 @@ # user know that something related to # db goes wrong. proc ::yadmin::dbError {{title ""} {descr ""}} { - if {title eq ""} {set title [mc "Database Error"]} - if {descr eq ""} {set descr [mc "Some errors occurs. Please verify your db connection and yaacs's log."]} + if {$title eq ""} {set title [mc "Database Error"]} + if {$descr eq ""} {set descr [mc "Some errors occurs. Please verify your db connection and yaacs's log."]} ::dialogs::error . $title $descr } @@ -4105,7 +4105,7 @@ set flu [::admin::flushStat $db $id] if {$flu < 0} { - if {$flu == $admin::ERR_IDREQ} { + if {$flu == $::admin::ERR_IDREQ} { ::dialogs::error . [mc "An invalid project's id has been supplied"] "" } else { ::yadmin::dbError @@ -4503,7 +4503,7 @@ bind .turns.fr.tab <Double-Button-1> { set coord [.turns.fr.tab curselection] - yadmin::editTurn $db .turns.fr.tab $coord [array get yadmin::turns] + ::yadmin::editTurn $db .turns.fr.tab $coord [array get ::yadmin::turns] } grid .turns.fr.tab .turns.fr.sb -sticky news -pady 5 @@ -4742,7 +4742,7 @@ array set survey [::project::get_proj $db $pjName] set idPj $survey(proj) - set checkLia [::cati::get_lia $db $pj] + set checkLia [::cati::get_lia $db $idPj] if {$checkLia == 0} { set path "" } else { @@ -4820,7 +4820,7 @@ set flu [::admin::flushStat $db $idPj] if {$flu < 0} { - if {$flu == $admin::ERR_IDREQ} { + if {$flu == $::admin::ERR_IDREQ} { ::dialogs::error . [mc "An invalid project's id has been supplied"] } else { ::yadmin::dbError @@ -5200,7 +5200,7 @@ return } - if {$yadmin::qType == -1} { + if {$::yadmin::qType == -1} { ::yalog::debug "Nothing to refresh, first user has to choose the quota checking type" return } @@ -5293,6 +5293,7 @@ foreach q $quota { array unset aq array set aq $q + set lab $aq(label) if {$r == 1} { set T($r,0) "$aq(label)" set T($r,la) "" @@ -5318,7 +5319,6 @@ set subFtheo 0 } } - set lab $aq(label) set sex $aq(sex) if {$sex == "F"} { set j 2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |