Index: branches/5.2.x/units/files/files_config.php =================================================================== diff -u -N -r13845 -r14089 --- branches/5.2.x/units/files/files_config.php (.../files_config.php) (revision 13845) +++ branches/5.2.x/units/files/files_config.php (.../files_config.php) (revision 14089) @@ -1,6 +1,6 @@ true, 'AutoClone' => true, - 'ListSQLs' => Array ( '' => 'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array ( '' => 'SELECT * FROM %s', - ), - 'FilterMenu' => Array ( - 'Groups' => Array ( - Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_disabled'), 'type' => WHERE_FILTER), - ), - 'Filters' => Array ( - 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), - 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - ) - ), + 'ListSQLs' => Array ( + '' => 'SELECT * FROM %s', + ), // key - special, value - list select sql + + 'ItemSQLs' => Array ( + '' => 'SELECT * FROM %s', + ), + 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array ('AddedOn' => 'desc', 'Version' => 'desc'), - ) - ), + '' => Array ( + 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'), + 'Sorting' => Array ('AddedOn' => 'desc', 'Version' => 'desc'), + ) + ), + 'Fields' => Array ( 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), @@ -87,8 +83,8 @@ 'upload_dir' => ITEM_FILES_PATH, 'include_path' => 0, 'size_field' => 'Size', 'max_size' => 50000000, 'orig_name_field' => 'FilePath', - 'content_type_field' => 'MIMEType', - 'not_null' => 1, 'skip_empty' =>1, 'default' => '', + 'content_type_field' => 'MIMEType', + 'not_null' => 1, 'skip_empty' =>1, 'default' => '', 'error_msgs' => Array ( 'bad_file_format' => '!la_error_InvalidFileFormat!', 'bad_file_size' => '!la_error_FileTooLarge!', @@ -102,24 +98,24 @@ ), 'Status' => Array ( 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, ), 'IsPrimary' => Array ( 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0, ), 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'AddedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'AddedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'AddedById' => Array ('type' => 'int', 'default' => NULL), 'MIMEType' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), ), - + 'VirtualFields' => Array ( - + ), 'Grids' => Array ( @@ -140,6 +136,7 @@ 'Version' => Array ( 'title' => 'la_col_Version', 'filter_block' => 'grid_like_filter'), 'Size' => Array ( 'title' => 'la_col_Size', 'filter_block' => 'grid_float_range_filter'), 'AddedOn' => Array ( 'title' => 'la_col_AddedOn', 'format' => '_regional_DateFormat', 'filter_block' => 'grid_date_range_filter'), + 'Status' => Array ( 'title' => 'la_col_Status', 'filter_block' => 'grid_options_filter'), ), ), ),