Index: branches/5.2.x/units/downloads/downloads_config.php =================================================================== diff -u -N -r15134 -r16385 --- branches/5.2.x/units/downloads/downloads_config.php (.../downloads_config.php) (revision 15134) +++ branches/5.2.x/units/downloads/downloads_config.php (.../downloads_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'down', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'kDBEventHandler','file'=>'','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'), +$config = Array ( + 'Prefix' => 'down', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'RegisterClasses' => Array( - Array('pseudo' => 'DownloadHelper', 'class' => 'DownloadHelper', 'file' => 'download_helper.php', 'build_event' => ''), - ), + 'RegisterClasses' => Array ( + Array ('pseudo' => 'DownloadHelper', 'class' => 'DownloadHelper', 'file' => 'download_helper.php', 'build_event' => ''), + ), - 'AutoLoad' => true, - 'Hooks' => Array( - /*Array( - 'Mode' => hBEFORE, - 'Conditional' => true, - 'HookToPrefix' => 'p', - 'HookToSpecial' => '', - 'HookToEvent' => Array( 'onPreSave' ), - 'DoPrefix' => 'pr', - 'DoSpecial' => 'tang', - 'DoEvent' => 'OnArrange', - ),*/ - ), - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), - 'TitlePresets' => Array( - 'downloads_list'=>Array( 'prefixes' => Array('down_List'), - 'format' => "!la_title_FileDownloads!", - ), - ), + 'AutoLoad' => true, - 'PermSection' => Array('main' => 'in-commerce:downloadlog'), + /*'Hooks' => Array ( + Array ( + 'Mode' => hBEFORE, + 'Conditional' => true, + 'HookToPrefix' => 'p', + 'HookToSpecial' => '', + 'HookToEvent' => Array ( 'onPreSave' ), + 'DoPrefix' => 'pr', + 'DoSpecial' => 'tang', + 'DoEvent' => 'OnArrange', + ), + ),*/ - 'Sections' => Array( - 'in-commerce:downloadlog' => Array( - 'parent' => 'in-portal:reports', - 'icon' => 'download_log', - 'label' => 'la_tab_DownloadLog', - 'url' => Array('t' => 'in-commerce/downloads/downloads_list', 'pass' => 'm'), - 'permissions' => Array('view', 'delete'), - 'priority' => 7, - 'type' => stTREE, - ), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'IDField' => 'DownloadId', - 'TitleField' => 'Name', - 'TableName' => TABLE_PREFIX.'UserDownloads', + 'TitlePresets' => Array ( + 'downloads_list' => Array ( + 'prefixes' => Array ('down_List'), 'format' => "!la_title_FileDownloads!", + ), + ), - 'ListSQLs' => Array( ''=>'SELECT * FROM %s', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('StartedOn' => 'desc'), - ) - ), - 'Fields' => Array( - 'DownloadId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'Username' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'ProductId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'ProductName' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'FileId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'Filename' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'IPAddress' => Array('type' => 'string','not_null' => 1, 'default' => ''), - 'StartedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => NULL), - 'EndedOn' => Array('type' => 'int','formatter' => 'kDateFormatter', 'default' => NULL), - ), - 'VirtualFields' => Array( - ), + 'PermSection' => Array ('main' => 'in-commerce:downloadlog'), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 'module' => 'core', - ), - 'Fields' => Array( - 'DownloadId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Username' => Array( 'filter_block' => 'grid_like_filter', 'width' => 100, ), - 'ProductName' => Array( 'title'=>'la_col_DownloadedProductName', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'Filename' => Array( 'title'=>'la_col_DownloadedFileName', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'IPAddress' => Array( 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'StartedOn' => Array( 'title'=>'la_col_StartedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), - ), - ), - ), + 'Sections' => Array ( + 'in-commerce:downloadlog' => Array ( + 'parent' => 'in-portal:reports', + 'icon' => 'download_log', + 'label' => 'la_tab_DownloadLog', + 'url' => Array ('t' => 'in-commerce/downloads/downloads_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'delete'), + 'priority' => 7, + 'type' => stTREE, + ), + ), - ); \ No newline at end of file + 'IDField' => 'DownloadId', + 'TitleField' => 'Name', + 'TableName' => TABLE_PREFIX.'UserDownloads', + + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s', + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('StartedOn' => 'desc'), + ) + ), + + 'Fields' => Array ( + 'DownloadId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Username' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ProductId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ProductName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'IPAddress' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'StartedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + 'EndedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'DownloadId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Username' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'ProductName' => Array ( 'title' => 'la_col_DownloadedProductName', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'Filename' => Array ( 'title' => 'la_col_DownloadedFileName', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'IPAddress' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'StartedOn' => Array ( 'title' => 'la_col_StartedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ), + ), + ), + ), +); \ No newline at end of file