Index: branches/5.1.x/units/topics/topics_config.php =================================================================== diff -u -N -r13548 -r13577 --- branches/5.1.x/units/topics/topics_config.php (.../topics_config.php) (revision 13548) +++ branches/5.1.x/units/topics/topics_config.php (.../topics_config.php) (revision 13577) @@ -1,6 +1,6 @@ Array ( '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.OwnerId = -1, "root", IF (%1$s.OwnerId = -2, "Guest", "n/a")), u.Login)', + 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.OwnerId = ' . USER_ROOT . ', "root", IF (%1$s.OwnerId = ' . USER_GUEST . ', "Guest", "n/a")), u.Login)', 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', @@ -399,24 +399,24 @@ 'OwnerId' => Array ( 'type' => 'int', 'formatter' => 'kLEFTFormatter', - 'options' => Array (-1 => 'root', -2 => 'Guest'), + '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', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), - 'required' => 1, 'not_null' => 1, 'default' => -1, + 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT, ), 'ModifiedById' => Array ( 'type' => 'int', 'formatter' => 'kLEFTFormatter', - 'options' => Array (-1 => 'root', -2 => 'Guest'), + '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', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), - 'required' => 1, 'not_null' => 1, 'default' => -1, + 'required' => 1, 'not_null' => 1, 'default' => USER_ROOT, ), 'ResourceId' => Array ('type' => 'int', 'default' => null), 'TopicType' => Array ( @@ -481,7 +481,7 @@ 'CachedNavbar' => Array ('type' => 'string', 'default' => ''), 'LastPoster' => Array ('type' => 'string', 'default' => ''), - 'LastPosterId' => Array ('type' => 'int', 'default' => -2), + 'LastPosterId' => Array ('type' => 'int', 'default' => USER_GUEST), 'PostingText' => Array ( 'type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1,