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,