Index: branches/5.2.x/core/units/files/files_config.php =================================================================== diff -u -N -r15012 -r16388 --- branches/5.2.x/core/units/files/files_config.php (.../files_config.php) (revision 15012) +++ branches/5.2.x/core/units/files/files_config.php (.../files_config.php) (revision 16388) @@ -1,6 +1,6 @@ '#file', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'FileEventHandler', 'file' => 'file_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'FileTagProcessor', 'file' => 'file_tp.php', 'build_event' => 'OnBuild'), +$config = Array ( + 'Prefix' => '#file', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'FileEventHandler', 'file' => 'file_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'FileTagProcessor', 'file' => 'file_tp.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'IDField' => 'FileId', - 'StatusField' => Array('Status'), + 'IDField' => 'FileId', + 'StatusField' => Array ('Status'), - 'TitleField' => 'FileName', - 'TableName' => TABLE_PREFIX.'CatalogFiles', + 'TitleField' => 'FileName', + 'TableName' => TABLE_PREFIX.'CatalogFiles', - 'ParentTableKey' => 'ResourceId', - 'ForeignKey' => 'ResourceId', - 'AutoDelete' => true, - 'AutoClone' => true, + 'ParentTableKey' => 'ResourceId', + 'ForeignKey' => 'ResourceId', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ListSQLs' => Array ( - '' => 'SELECT * FROM %s', - ), + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), - 'ItemSQLs' => Array ( - '' => 'SELECT * FROM %s', - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('FileName' => 'asc'), + ) + ), - 'ListSortings' => Array ( - '' => Array ( - 'Sorting' => Array ('FileName' => 'asc'), - ) - ), - - 'Fields' => Array ( - 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'FileName' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''), - 'FilePath' => Array ( - 'type' => 'string', 'max_len' => 255, - 'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'include_path' => false, - 'size_field' => 'Size', 'content_type_field' => 'MimeType', 'max_size' => 50000000, - 'allowed_types' => Array ( - 'video/x-flv', 'video/quicktime', 'video/x-sgi-movie', 'video/mpeg', - 'video/x-msvideo', 'video/x-msvideo', 'application/x-shockwave-flash', 'video/x-fli', - 'application/pdf', 'application/msexcel', 'application/vnd.ms-excel', 'application/msword', - 'application/mspowerpoint', 'application/zip', 'text/plain', 'application/x-gzip', - ), - 'not_null' => 1, 'required' => 1, 'default' => '' + 'Fields' => Array ( + 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'FileName' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''), + 'FilePath' => Array ( + 'type' => 'string', 'max_len' => 255, + 'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'include_path' => false, + 'size_field' => 'Size', 'content_type_field' => 'MimeType', 'max_size' => 50000000, + 'allowed_types' => Array ( + 'video/x-flv', 'video/quicktime', 'video/x-sgi-movie', 'video/mpeg', + 'video/x-msvideo', 'video/x-msvideo', 'application/x-shockwave-flash', 'video/x-fli', + 'application/pdf', 'application/msexcel', 'application/vnd.ms-excel', 'application/msword', + 'application/mspowerpoint', 'application/zip', 'text/plain', 'application/x-gzip', ), - 'Size' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 1, - ), - 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'CreatedById' => Array ('type' => 'int', 'default' => NULL), - 'MimeType' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'not_null' => 1, 'required' => 1, 'default' => '' ), + 'Size' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1, + ), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), + 'CreatedById' => Array ('type' => 'int', 'default' => NULL), + 'MimeType' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'), - 'Fields' => Array( - 'FileId' => Array ('title' => 'column:la_fld_Id' , 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'), - 'FileName' => Array ('filter_block' => 'grid_like_filter'), - 'Status' => Array ('filter_block' => 'grid_options_filter'), - ), + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array (1 => 'icon16_item.png', 0 => 'icon16_disabled.png'), + 'Fields' => Array ( + 'FileId' => Array ('title' => 'column:la_fld_Id' , 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal', 'filter_block' => 'grid_range_filter'), + 'FileName' => Array ('filter_block' => 'grid_like_filter'), + 'Status' => Array ('filter_block' => 'grid_options_filter'), ), ), - ); \ No newline at end of file + ), +); \ No newline at end of file