Index: openacs-4/packages/acs-lang/www/change-locale.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/change-locale.tcl,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/acs-lang/www/change-locale.tcl 1 Oct 2019 11:49:25 -0000 1.5.2.1 +++ openacs-4/packages/acs-lang/www/change-locale.tcl 2 Oct 2019 07:07:04 -0000 1.5.2.2 @@ -5,13 +5,12 @@ return_url:localurl } -validate { valid_user_locale -requires user_locale { - if {![::xo::dc 0or1row user_locale_exists {select 1 from ad_locales where locale = :user_locale}] } { + if {$user_locale ni [lang::system::get_locales]} { ad_complain "invalid user_locale" } } } - if { [catch {lang::user::set_locale $user_locale} errmsg] } { ns_log Error "acs-lang/www/change-locale crashed calling lang::user::set_locale with user_locale='$user_locale'\n$errmsg" ad_return_error [_ acs-lang.Error_changing_locale] [_ acs-lang.User_locale_not_set]