Index: branches/5.1.x/units/products/products_config.php =================================================================== diff -u -N -r14005 -r14121 --- branches/5.1.x/units/products/products_config.php (.../products_config.php) (revision 14005) +++ branches/5.1.x/units/products/products_config.php (.../products_config.php) (revision 14121) @@ -1,6 +1,6 @@ Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, 'options' =>Array (1=> 'la_product_tangible', 2=> 'la_product_subscription', 4=> 'la_product_downloadable', 3=> 'la_product_service'/*, 6=> 'la_gift_certificate', 5=> 'la_product_package'*/), 'not_null' => 1, 'default' => 1 ), 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), 'ModifiedById' => Array ('type' => 'int', 'default' => NULL), - 'CreatedById' => Array ('type' => 'int', 'required' => 1, 'default' => NULL), + 'CreatedById' => Array ( + 'type' => 'int', + 'formatter' => 'kLEFTFormatter', + '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!'), + 'sample_value' => 'Guest', 'required' => 1, 'default' => NULL, + ), 'ResourceId' => Array ('type' => 'int', 'default' => null), 'CachedReviewsQty' => Array ('type' => 'int', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), 'InventoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_by_product', 2 => 'la_by_options'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),