Index: branches/5.2.x/units/private_messages/private_messages_config.php =================================================================== diff -u -N -r14252 -r14722 --- branches/5.2.x/units/private_messages/private_messages_config.php (.../private_messages_config.php) (revision 14252) +++ branches/5.2.x/units/private_messages/private_messages_config.php (.../private_messages_config.php) (revision 14722) @@ -1,6 +1,6 @@ 'pmb.Body', 'Options' => 'pmb.Options', - 'FromName' => 'IF (ISNULL(from_user.Login), IF (%1$s.FromId = ' . USER_ROOT . ', "root", IF (%1$s.FromId = ' . USER_GUEST . ', "Guest", "n/a")), from_user.Login)', - 'ToName' => 'IF (ISNULL(to_user.Login), IF (%1$s.ToId = ' . USER_ROOT . ', "root", IF (%1$s.ToId = ' . USER_GUEST . ', "Guest", "n/a")), to_user.Login)', + 'FromName' => 'IF (ISNULL(from_user.Username), IF (%1$s.FromId = ' . USER_ROOT . ', "root", IF (%1$s.FromId = ' . USER_GUEST . ', "Guest", "n/a")), from_user.Username)', + 'ToName' => 'IF (ISNULL(to_user.Username), IF (%1$s.ToId = ' . USER_ROOT . ', "root", IF (%1$s.ToId = ' . USER_GUEST . ', "Guest", "n/a")), to_user.Username)', 'FromFullName' => 'TRIM(CONCAT(from_user.FirstName, " ", from_user.LastName))', 'ToFullName' => 'TRIM(CONCAT(to_user.FirstName, " ", to_user.LastName))', @@ -86,8 +86,8 @@ 'Fields' => Array ( 'PmId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'FromId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' => 1, 'default' => null), - 'ToId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'required' => 1, 'default' => null), + 'FromId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => null), + 'ToId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!lu_error_UserNotFound!'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => null), 'FolderId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_Inbox', 1 => 'lu_Sent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => PM_FOLDER_SENT), 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_opt_MessageUnread', 1 => 'lu_opt_MessageViewed', 2 => 'lu_opt_MessageRead', 3 => 'lu_opt_MessageReplied', 4 => 'lu_opt_MessageSent'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), 'PMBodyId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), Index: branches/5.2.x/units/topics/topics_config.php =================================================================== diff -u -N -r14710 -r14722 --- branches/5.2.x/units/topics/topics_config.php (.../topics_config.php) (revision 14710) +++ branches/5.2.x/units/topics/topics_config.php (.../topics_config.php) (revision 14722) @@ -1,6 +1,6 @@ Array ( '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), u.Login)', + 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), u.Username)', 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', @@ -388,7 +388,7 @@ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser WHERE `%s` = \'%s\' ', 'left_key_field' => 'PortalUserId', - 'left_title_field' => 'Login', + 'left_title_field' => 'Username', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'sample_value' => 'Guest', 'required' => 1, 'default' => NULL, ), @@ -399,7 +399,7 @@ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser WHERE `%s` = \'%s\' ', 'left_key_field' => 'PortalUserId', - 'left_title_field' => 'Login', + 'left_title_field' => 'Username', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'default' => NULL, ), Index: branches/5.2.x/units/poll_comments/poll_comments_config.php =================================================================== diff -u -N -r14581 -r14722 --- branches/5.2.x/units/poll_comments/poll_comments_config.php (.../poll_comments_config.php) (revision 14581) +++ branches/5.2.x/units/poll_comments/poll_comments_config.php (.../poll_comments_config.php) (revision 14722) @@ -1,6 +1,6 @@ Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', - 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', + 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'required' => 1, 'default' => NULL), 'GuestName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), 'GuestEmail' => Array('type' => 'string', 'max_len' => 255, 'formatter'=>'kFormatter', 'regexp'=>'/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', 'sample_value' => 'email@domain.com', 'not_null' => '1', 'default' => '', 'error_msgs' => Array('invalid_format'=>'!la_invalid_email!', 'unique'=>'!lu_email_already_exist!'),'required' => 0 ), @@ -81,7 +81,7 @@ 'CalculatedFields' => Array ( '' => Array ( - 'CommentedByUser' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Login )', + 'CommentedByUser' => 'IF( ISNULL(pu.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Username )', ), ), Index: branches/5.2.x/units/posts/posts_config.php =================================================================== diff -u -N -r14252 -r14722 --- branches/5.2.x/units/posts/posts_config.php (.../posts_config.php) (revision 14252) +++ branches/5.2.x/units/posts/posts_config.php (.../posts_config.php) (revision 14722) @@ -1,6 +1,6 @@ Array ( '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Login)', + 'UserName' => 'IF (ISNULL(u.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Username)', 'AltName' => 'img.AltName', 'SameImages' => 'img.SameImages', @@ -87,8 +87,8 @@ 'GraphicsUrl' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), - 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL), - 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL), + 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL), + 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL), 'TopicId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'ReplyTo' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), Index: branches/5.2.x/units/posts/post_eh.php =================================================================== diff -u -N -r14624 -r14722 --- branches/5.2.x/units/posts/post_eh.php (.../post_eh.php) (revision 14624) +++ branches/5.2.x/units/posts/post_eh.php (.../post_eh.php) (revision 14722) @@ -1,6 +1,6 @@ SetDBField('IPAddress', $_SERVER['REMOTE_ADDR']); - $sql = 'SELECT Login + $sql = 'SELECT Username FROM ' . TABLE_PREFIX . 'PortalUser WHERE PortalUserId = ' . $user_id; $object->SetDBField('PosterAlias', $this->Conn->GetOne($sql)); @@ -189,7 +189,7 @@ $options_map = $post_helper->getOptionsMap(); $post_options = $object->GetDBField('Options'); - + foreach ($options_map as $option_name => $field_name) { $option_value = $post_helper->GetPostOption($option_name, $post_options); $object->SetDBField($field_name, (int)$option_value); @@ -251,7 +251,7 @@ // auto-lock topic after N number of posts (if option enabled) $auto_lock = $this->Application->ConfigValue('AutoTopicLockPosts'); - + if ( (int)$auto_lock > 0 ) { if ( $posts_count >= $auto_lock ) { // user has unlocked topic after $auto_lock and posts again -> ensure that topic will be locked again