Index: branches/RC/core/units/sections/sections_config.php =================================================================== diff -u -N -r10780 -r10839 --- branches/RC/core/units/sections/sections_config.php (.../sections_config.php) (revision 10780) +++ branches/RC/core/units/sections/sections_config.php (.../sections_config.php) (revision 10839) @@ -205,16 +205,6 @@ 'type' => stTREE, ), - 'in-portal:searchlog' => Array ( - 'parent' => 'in-portal:reports', - 'icon' => 'in-portal:search_log', - 'label' => 'la_tab_SearchLog', - 'url' => Array ('index_file' => 'logs/searchlog.php', 'pass' => 'm'), - 'permissions' => Array ('view', 'delete'), - 'priority' => 2, - 'type' => stTREE, - ), - 'in-portal:sessionlog' => Array ( 'parent' => 'in-portal:reports', 'icon' => 'in-portal:sessions_log', Index: branches/RC/core/admin_templates/logs/search_logs/search_log_list.tpl =================================================================== diff -u -N --- branches/RC/core/admin_templates/logs/search_logs/search_log_list.tpl (revision 0) +++ branches/RC/core/admin_templates/logs/search_logs/search_log_list.tpl (revision 10839) @@ -0,0 +1,79 @@ + + + + + + + + + + + +
+ + + + + + +
+ +
+
+ + + + + Index: branches/RC/core/units/logs/search_logs/search_logs_config.php =================================================================== diff -u -N --- branches/RC/core/units/logs/search_logs/search_logs_config.php (revision 0) +++ branches/RC/core/units/logs/search_logs/search_logs_config.php (revision 10839) @@ -0,0 +1,77 @@ + 'search-log', + 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'SearchLogEventHandler', 'file' => 'search_log_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), + + 'AutoLoad' => true, + + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'event', + 4 => 'mode', + ), + + 'IDField' => 'SearchLogId', + + 'TableName' => TABLE_PREFIX . 'SearchLog', + + 'TitlePresets' => Array ( + + 'search_log_list' => Array ('prefixes' => Array('search-log_List'), 'format' => '!la_tab_SearchLog! (#search-log_recordcount#)',), + ), + + 'PermSection' => Array ('main' => 'in-portal:searchlog'), + + 'Sections' => Array ( + 'in-portal:searchlog' => Array ( + 'parent' => 'in-portal:reports', + 'icon' => 'in-portal:search_log', + 'label' => 'la_tab_SearchLog', + 'url' => Array('t' => 'in-portal/search_logs/search_log_list', 'pass' => 'm'), + 'permissions' => Array('view', 'delete'), + 'priority' => 2, + 'type' => stTREE, + ), + ), + + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s FROM %1$s', + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Keyword' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'SearchLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Keyword' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'Indices' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'SearchType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Text_Simple', 1 => 'la_Text_Advanced'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Fields' => Array ( + 'SearchLogId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter',), + 'SearchType' => Array ('title' => 'la_prompt_SearchType', 'filter_block' => 'grid_options_filter', ), + 'Keyword' => Array ('title' => 'la_col_Keyword', 'filter_block' => 'grid_like_filter', ), + 'Indices' => Array ('title' => 'la_prompt_Frequency', 'filter_block' => 'grid_range_filter', ), + ), + ), + ), + + 'ConfigMapping' => Array( + 'PerPage' => 'Perpage_SearchLog', + ), + ); \ No newline at end of file Index: branches/RC/kernel/units/search_logs/search_logs_config.php =================================================================== diff -u -N --- branches/RC/kernel/units/search_logs/search_logs_config.php (revision 0) +++ branches/RC/kernel/units/search_logs/search_logs_config.php (revision 10839) @@ -0,0 +1,77 @@ + 'search-log', + 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'SearchLogEventHandler', 'file' => 'search_log_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), + + 'AutoLoad' => true, + + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'event', + 4 => 'mode', + ), + + 'IDField' => 'SearchLogId', + + 'TableName' => TABLE_PREFIX . 'SearchLog', + + 'TitlePresets' => Array ( + + 'search_log_list' => Array ('prefixes' => Array('search-log_List'), 'format' => '!la_tab_SearchLog! (#search-log_recordcount#)',), + ), + + 'PermSection' => Array ('main' => 'in-portal:searchlog'), + + 'Sections' => Array ( + 'in-portal:searchlog' => Array ( + 'parent' => 'in-portal:reports', + 'icon' => 'in-portal:search_log', + 'label' => 'la_tab_SearchLog', + 'url' => Array('t' => 'in-portal/search_logs/search_log_list', 'pass' => 'm'), + 'permissions' => Array('view', 'delete'), + 'priority' => 2, + 'type' => stTREE, + ), + ), + + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s FROM %1$s', + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Keyword' => 'asc'), + ) + ), + + 'Fields' => Array ( + 'SearchLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Keyword' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), + 'Indices' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'SearchType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Text_Simple', 1 => 'la_Text_Advanced'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0 + ), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Fields' => Array ( + 'SearchLogId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter',), + 'SearchType' => Array ('title' => 'la_prompt_SearchType', 'filter_block' => 'grid_options_filter', ), + 'Keyword' => Array ('title' => 'la_col_Keyword', 'filter_block' => 'grid_like_filter', ), + 'Indices' => Array ('title' => 'la_prompt_Frequency', 'filter_block' => 'grid_range_filter', ), + ), + ), + ), + + 'ConfigMapping' => Array( + 'PerPage' => 'Perpage_SearchLog', + ), + ); \ No newline at end of file Index: branches/RC/kernel/admin_templates/search_logs/search_log_list.tpl =================================================================== diff -u -N --- branches/RC/kernel/admin_templates/search_logs/search_log_list.tpl (revision 0) +++ branches/RC/kernel/admin_templates/search_logs/search_log_list.tpl (revision 10839) @@ -0,0 +1,79 @@ + + + + + + + + + + + +
+ + + + + + +
+ +
+
+ + + + + Index: branches/RC/kernel/admin_templates/img/toolbar/tool_clear_selected.gif =================================================================== diff -u -N Binary files differ Index: branches/RC/kernel/admin_templates/img/toolbar/tool_clear_selected_f2.gif =================================================================== diff -u -N Binary files differ Index: branches/RC/kernel/units/search_logs/search_log_eh.php =================================================================== diff -u -N --- branches/RC/kernel/units/search_logs/search_log_eh.php (revision 0) +++ branches/RC/kernel/units/search_logs/search_log_eh.php (revision 10839) @@ -0,0 +1,37 @@ + Array ('self' => 'delete'), + ); + + $this->permMapping = array_merge($this->permMapping, $permissions); + } + + /** + * Deletes all records from list + * + * @param kEvent $event + */ + function OnDeleteAll(&$event) + { + $sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . ' + FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName'); + $ids = $this->Conn->GetCol($sql); + + if ($ids) { + $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); + /* @var $temp_handler kTempTablesHandler */ + + $temp_handler->DeleteItems($event->Prefix, $event->Special, $ids); + } + } + } \ No newline at end of file Index: branches/RC/kernel/admin_templates/img/toolbar/tool_clear_selected_f3.gif =================================================================== diff -u -N Binary files differ Index: branches/RC/core/units/logs/search_logs/search_log_eh.php =================================================================== diff -u -N --- branches/RC/core/units/logs/search_logs/search_log_eh.php (revision 0) +++ branches/RC/core/units/logs/search_logs/search_log_eh.php (revision 10839) @@ -0,0 +1,37 @@ + Array ('self' => 'delete'), + ); + + $this->permMapping = array_merge($this->permMapping, $permissions); + } + + /** + * Deletes all records from list + * + * @param kEvent $event + */ + function OnDeleteAll(&$event) + { + $sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . ' + FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName'); + $ids = $this->Conn->GetCol($sql); + + if ($ids) { + $temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler'); + /* @var $temp_handler kTempTablesHandler */ + + $temp_handler->DeleteItems($event->Prefix, $event->Special, $ids); + } + } + } \ No newline at end of file