Index: branches/RC/core/install/install_schema.sql =================================================================== diff -u -r9363 -r9419 --- branches/RC/core/install/install_schema.sql (.../install_schema.sql) (revision 9363) +++ branches/RC/core/install/install_schema.sql (.../install_schema.sql) (revision 9419) @@ -229,7 +229,7 @@ CREATE TABLE SessionData ( SessionKey varchar(50) NOT NULL default '', VariableName varchar(255) NOT NULL default '', - VariableValue text NOT NULL, + VariableValue longtext NOT NULL, PRIMARY KEY (SessionKey,VariableName), KEY SessionKey (SessionKey), KEY VariableName (VariableName) Index: branches/RC/core/units/users/users_config.php =================================================================== diff -u -r9406 -r9419 --- branches/RC/core/units/users/users_config.php (.../users_config.php) (revision 9406) +++ branches/RC/core/units/users/users_config.php (.../users_config.php) (revision 9419) @@ -142,7 +142,7 @@ ( 'PortalUserId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Login' => Array('type' => 'string', 'unique'=>Array('Login'), 'default' => null,'required'=>1, 'error_msgs' => Array('unique'=>'!lu_user_already_exist!')), - 'Password' => Array('type' => 'string', 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword', 'skip_empty' => 1, 'default' => md5(''), 'required' => 1), + 'Password' => Array('type' => 'string', 'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword', 'skip_empty' => 1, 'default' => md5('')), 'FirstName' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), 'LastName' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), 'Company' => Array('type' => 'string','not_null' => '1','default' => ''), @@ -173,7 +173,7 @@ 'ResourceId' => Array('type' => 'int','not_null' => 1, 'default' => 0), 'Status' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(1=>'la_Enabled', 0=>'la_Disabled', 2=>'la_Pending'), 'use_phrases'=>1, 'not_null' => '1','default' => 2), 'Modified' => Array('type' => 'int', 'formatter'=>'kDateFormatter', 'not_null' => '1', 'default' => '#NOW#' ), - 'dob' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => null, 'required'=>0), + 'dob' => Array('type'=>'int', 'formatter' => 'kDateFormatter', 'default' => null), 'tz' => Array('type' => 'int','default' => 0), 'ip' => Array('type' => 'string','default' => null), 'IsBanned' => Array('type' => 'int','not_null' => 1, 'default' => 0), Index: branches/RC/core/install/upgrades.sql =================================================================== diff -u -r9417 -r9419 --- branches/RC/core/install/upgrades.sql (.../upgrades.sql) (revision 9417) +++ branches/RC/core/install/upgrades.sql (.../upgrades.sql) (revision 9419) @@ -125,8 +125,8 @@ # ===== v 4.2.1 ===== INSERT INTO ConfigurationAdmin VALUES ('UseSmallHeader', 'la_Text_Website', 'la_config_UseSmallHeader', 'checkbox', '', '', 10.21, 0, 0); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_general'); -INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_DefaultRegistrationCountry', 'select', NULL , 'SELECT DestName AS OptionName, DestId AS OptionValue FROM StdDestinations WHERE DestParentId IS NULL Order BY OptionName', 10.111, 0, 0); +INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_config_DefaultRegistrationCountry', 'select', NULL , '=+,SELECT DestName AS OptionName, DestId AS OptionValue FROM StdDestinations WHERE DestParentId IS NULL Order BY OptionName', 10.111, 0, 0); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users'); ALTER TABLE Category ADD SymLinkCategoryId INT UNSIGNED NULL DEFAULT NULL AFTER `Type`, ADD INDEX (SymLinkCategoryId); @@ -136,4 +136,5 @@ ADD AdminInterfaceLang TINYINT UNSIGNED NOT NULL AFTER PrimaryLang, ADD Priority INT NOT NULL AFTER AdminInterfaceLang; -DELETE FROM PersistantSessionData WHERE VariableName = 'lang_columns_.'; \ No newline at end of file +DELETE FROM PersistantSessionData WHERE VariableName = 'lang_columns_.'; +ALTER TABLE SessionData CHANGE VariableValue VariableValue longtext NOT NULL; \ No newline at end of file Index: branches/RC/themes/default2007/platform/login/register.tpl =================================================================== diff -u -r9079 -r9419 --- branches/RC/themes/default2007/platform/login/register.tpl (.../register.tpl) (revision 9079) +++ branches/RC/themes/default2007/platform/login/register.tpl (.../register.tpl) (revision 9419) @@ -50,7 +50,7 @@ - + Index: branches/RC/themes/default2007/platform/my_account/my_profile.tpl =================================================================== diff -u -r8969 -r9419 --- branches/RC/themes/default2007/platform/my_account/my_profile.tpl (.../my_profile.tpl) (revision 8969) +++ branches/RC/themes/default2007/platform/my_account/my_profile.tpl (.../my_profile.tpl) (revision 9419) @@ -45,7 +45,7 @@ - + "/> Index: branches/RC/core/install/install_data.sql =================================================================== diff -u -r9415 -r9419 --- branches/RC/core/install/install_data.sql (.../install_data.sql) (revision 9415) +++ branches/RC/core/install/install_data.sql (.../install_data.sql) (revision 9419) @@ -66,7 +66,7 @@ INSERT INTO ConfigurationAdmin VALUES ('MailFunctionHeaderSeparator', 'la_Text_smtp_server', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux,2=la_Windows', 30.08, 0, 0); INSERT INTO ConfigurationAdmin VALUES ('UseToolbarLabels', 'la_Text_Website', 'la_config_UseToolbarLabels', 'checkbox', NULL , NULL , 10.20, 0, 0); INSERT INTO ConfigurationAdmin VALUES ('UseSmallHeader', 'la_Text_Website', 'la_config_UseSmallHeader', 'checkbox', '', '', 10.21, 0, 0); -INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_DefaultRegistrationCountry', 'select', NULL , 'SELECT DestName AS OptionName, DestId AS OptionValue FROM StdDestinations WHERE DestParentId IS NULL Order BY OptionName', 10.111, 0, 0); +INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_config_DefaultRegistrationCountry', 'select', NULL , '=+,SELECT DestName AS OptionName, DestId AS OptionValue FROM StdDestinations WHERE DestParentId IS NULL Order BY OptionName', 10.111, 0, 0); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Columns_Category', '2', 'In-Portal', 'Categories'); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'DomainSelect','1','In-Portal','in-portal:configure_general'); Index: branches/RC/core/units/users/users_event_handler.php =================================================================== diff -u -r9416 -r9419 --- branches/RC/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 9416) +++ branches/RC/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 9419) @@ -1327,7 +1327,7 @@ $this->Application->EmailEventAdmin($email_event); } } - + /** * OnAfterConfigRead for users * @@ -1336,15 +1336,14 @@ function OnAfterConfigRead(&$event) { parent::OnAfterConfigRead($event); - - // update Country SQL - $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); + $first_country = $this->Application->ConfigValue('User_Default_Registration_Country'); - - if ($first_country) { - $fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (DestId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']); + if ($first_country) { + // update user country dropdown sql + $fields = $this->Application->getUnitOption($event->Prefix, 'Fields'); + $fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (DestId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']); $this->Application->setUnitOption($event->Prefix, 'Fields', $fields); - } + } } } Index: branches/RC/admin/install/upgrades/inportal_upgrade_v4.2.1.sql =================================================================== diff -u -r9417 -r9419 --- branches/RC/admin/install/upgrades/inportal_upgrade_v4.2.1.sql (.../inportal_upgrade_v4.2.1.sql) (revision 9417) +++ branches/RC/admin/install/upgrades/inportal_upgrade_v4.2.1.sql (.../inportal_upgrade_v4.2.1.sql) (revision 9419) @@ -9,9 +9,9 @@ CREATE TABLE RelatedSearches (RelatedSearchId int(11) NOT NULL auto_increment, ResourceId int(11) NOT NULL default '0', Keyword varchar(255) NOT NULL default '', ItemType tinyint(4) NOT NULL default '0', Enabled tinyint(4) NOT NULL default '1', Priority int(11) NOT NULL default '0', PRIMARY KEY (RelatedSearchId), KEY Enabled (Enabled), KEY ItemType (ItemType), KEY ResourceId (ResourceId)); DELETE FROM PersistantSessionData WHERE VariableName = 'lang_columns_.'; +ALTER TABLE SessionData CHANGE VariableValue VariableValue longtext NOT NULL; -INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_DefaultRegistrationCountry', 'select', NULL , 'SELECT DestName AS OptionName, DestId AS OptionValue FROM StdDestinations WHERE DestParentId IS NULL Order BY OptionName', 10.111, 0, 1); - +INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_config_DefaultRegistrationCountry', 'select', NULL , '=+,SELECT DestName AS OptionName, DestId AS OptionValue FROM StdDestinations WHERE DestParentId IS NULL Order BY OptionName', 10.111, 0, 1); INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users'); UPDATE Modules SET Version = '4.2.1' WHERE Name = 'Core';