Index: branches/5.1.x/core/units/users/users_config.php =================================================================== diff -u -N -r13432 -r13470 --- branches/5.1.x/core/units/users/users_config.php (.../users_config.php) (revision 13432) +++ branches/5.1.x/core/units/users/users_config.php (.../users_config.php) (revision 13470) @@ -1,6 +1,6 @@ 0, 'Hooks' => Array ( Array ( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => 'u', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterItemLoad', 'OnBeforeItemCreate', 'OnBeforeItemUpdate', 'OnUpdateAddress'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnPrepareStates', - ), - - Array ( 'Mode' => hBEFORE, 'Conditional' => false, 'HookToPrefix' => 'affil', @@ -374,12 +363,11 @@ 'Country' => Array( 'type' => 'string', 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT %1$s - FROM '.TABLE_PREFIX.'StdDestinations - LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName - WHERE DestType = 1 - ORDER BY l%2$s_Translation', - 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM ' . TABLE_PREFIX . 'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => '' ), 'ResourceId' => Array('type' => 'int','not_null' => 1, 'default' => 0),