From fed40c748e80475559b812c69bafdf06d9e8e6f1 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 19 Jun 2012 09:25:45 +0000 Subject: [PATCH] 2012-06-19 Miguel de Dios * godmode/reporting/reporting_builder.list_items.php: some fixes. MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6587 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++ .../reporting_builder.list_items.php | 35 ++++++++++--------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c090a03e6b..c3ec235f66 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-06-19 Miguel de Dios + + * godmode/reporting/reporting_builder.list_items.php: some fixes. + + MERGED FROM 4.0.2 + 2012-06-18 Sergio Martin * include/functions_menu.php: Added categories in the diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php index b8839fcf43..c21f40f647 100644 --- a/pandora_console/godmode/reporting/reporting_builder.list_items.php +++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php @@ -158,10 +158,10 @@ $where = '1=1'; if ($typeFilter != '0') { $where .= ' AND type = "' . $typeFilter . '"'; } -if($agentFilter != 0) { +if ($agentFilter != 0) { $where .= ' AND id_agent = ' . $agentFilter; } -if($moduleFilter != 0) { +if ($moduleFilter != 0) { $where .= ' AND id_agent_module = ' . $moduleFilter; } @@ -183,12 +183,12 @@ switch ($config["dbtype"]) { case "oracle": $set = array(); $set['limit'] = $config["block_size"]; - $set['offset'] = $offset; + $set['offset'] = $offset; $items = oracle_recode_query ('SELECT * FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport . ' ORDER BY "order"', $set, 'AND', false); // Delete rnum row generated by oracle_recode_query() function - if ($items !== false){ + if ($items !== false) { for ($i=0; $i < count($items); $i++) { - unset($items[$i]['rnum']); + unset($items[$i]['rnum']); } } break; @@ -228,21 +228,23 @@ if ($items) { $table->head[5] = __('Description'); $table->head[6] = '' . __('Op.') . ''; $table->head[7] = __('Sort'); - + $table->align[6] = 'center'; $table->align[7] = 'center'; -} else { +} +else { echo '

'. __('No items') . '
'; } - $lastPage = true; - if (((($offset == 0) && ($config["block_size"] > $countItems)) || - ($countItems >= ($config["block_size"] + $offset))) && - ($countItems > $config["block_size"])) { - $lastPage = false; - } - $count = 0; - $rowPair = true; +$lastPage = true; +if (((($offset == 0) && ($config["block_size"] > $countItems)) || + ($countItems >= ($config["block_size"] + $offset))) && + ($countItems > $config["block_size"])) { + $lastPage = false; +} + +$count = 0; +$rowPair = true; if ($items === false) { $items = array(); @@ -296,7 +298,8 @@ foreach ($items as $item) { } else { $module_name_db = db_get_value_filter('nombre', 'tagente_modulo', array('id_agente_modulo' => $item['id_agent_module'])); - $row[3] = ui_print_truncate_text(io_safe_output($module_name_db), 'module_small'); + $row[3] = + ui_print_truncate_text(io_safe_output($module_name_db), 'module_small'); } }