2012-06-19 Miguel de Dios <miguel.dedios@artica.es>

* 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
This commit is contained in:
mdtrooper 2012-06-19 09:25:45 +00:00
parent 2ebddadd86
commit 0177bd11e3
2 changed files with 25 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2012-06-19 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.list_items.php: some fixes.
MERGED FROM 4.0.2
2012-06-18 Sergio Martin <sergio.martin@artica.es>
* include/functions_menu.php: Added categories in the

View File

@ -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] = '<span title="' . __('Options') . '">' . __('Op.') . '</span>';
$table->head[7] = __('Sort');
$table->align[6] = 'center';
$table->align[7] = 'center';
} else {
}
else {
echo '<br><br><div class="nf">'. __('No items') . '</div>';
}
$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');
}
}