Index: branches/5.1.x/units/links/links_config.php =================================================================== diff -u -N -r13567 -r13579 --- branches/5.1.x/units/links/links_config.php (.../links_config.php) (revision 13567) +++ branches/5.1.x/units/links/links_config.php (.../links_config.php) (revision 13579) @@ -1,6 +1,6 @@ Array ( '' => Array ( - 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', + 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', "root", IF (%1$s.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Login)', 'CategoryId' => TABLE_PREFIX.'%3$sCategoryItems.CategoryId', 'Filename' => TABLE_PREFIX.'%3$sCategoryItems.Filename', 'CategoryFilename' => TABLE_PREFIX.'Category.NamedParentPath', @@ -478,8 +478,8 @@ 'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'formatter' => 'kFormatter', 'default' => 0), 'CachedVotesQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'not_null' => 1, 'default' => 0), 'CachedReviewsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (-1 => 'root', -2 => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1), - 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (-1 => 'root', -2 => 'Guest'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'default' => -1), + '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', 'not_null' => 1, 'default' => USER_ROOT), + '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', 'not_null' => 1, 'default' => USER_ROOT), 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'Status' => Array ( 'type' => 'int', Index: branches/5.1.x/units/listings/listings_config.php =================================================================== diff -u -N -r13550 -r13579 --- branches/5.1.x/units/listings/listings_config.php (.../listings_config.php) (revision 13550) +++ branches/5.1.x/units/listings/listings_config.php (.../listings_config.php) (revision 13579) @@ -1,6 +1,6 @@ Array ( '' => Array ( 'LinkName' => 'CONCAT(item_table.Name, " (", item_table.Url, ")")', - 'LinkOwner' => 'IF (ISNULL(u.Login), IF (item_table.CreatedById = -1, "root", IF (item_table.CreatedById = -2, "Guest", "n/a")), u.Login)', + 'LinkOwner' => 'IF (ISNULL(u.Login), IF (item_table.CreatedById = ' . USER_ROOT . ', "root", IF (item_table.CreatedById = ' . USER_GUEST . ', "Guest", "n/a")), u.Login)', ), ), 'Fields' => Array ( 'ListingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), 'ListingTypeId' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', - 'options_sql' => 'SELECT %s - FROM '.TABLE_PREFIX.'ListingTypes + 'options_sql' => 'SELECT %s + FROM '.TABLE_PREFIX.'ListingTypes ORDER BY Name', 'option_key_field' => 'ListingTypeId', 'option_title_field' => 'Name', 'default' => 0, ), 'ItemResourceId' => Array ( 'type' => 'int', - 'required' => 1, 'unique' => Array ('ItemResourceId'), 'default' => null, + 'required' => 1, 'unique' => Array ('ItemResourceId'), 'default' => null, 'error_field' => 'LinkName', ), 'PurchasedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), 'ExpiresOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#', 'required' =>1), 'Status' => Array ( - 'type' => 'int', + 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2, Index: branches/5.1.x/install.php =================================================================== diff -u -N -r13196 -r13579 --- branches/5.1.x/install.php (.../install.php) (revision 13196) +++ branches/5.1.x/install.php (.../install.php) (revision 13579) @@ -1,6 +1,6 @@ Init(); - if ($application->RecallVar('user_id') != -1) { + if ($application->RecallVar('user_id') != USER_ROOT) { die('restricted access!'); }