From 64b2ad8f6b0653bda4b76f0732df6f332195ea55 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Fri, 22 Jan 2016 09:29:07 +0100 Subject: [PATCH] Fixed view and call funtions, dont work in Oracle's DB. Tiquet: #3231 --- pandora_console/godmode/alerts/alert_templates.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index 290cea6751..ff0605390a 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -225,10 +225,15 @@ if ($delete_template) { __('Could not be deleted')); } -$url = ui_get_url_refresh (array ('offset' => false)); $search_string = (string) get_parameter ('search_string'); $search_type = (string) get_parameter ('search_type'); +$url = ui_get_url_refresh ( + array ('offset' => false, + 'search_string' => $search_string, + 'search_type' => $search_type + )); + $table = new stdClass(); $table->width = '100%'; $table->class = 'databox filters'; @@ -252,7 +257,7 @@ $table->data[0][2] = __('Search'); $table->data[0][3] = html_print_input_text ('search_string', $search_string, '', 25, 255, true); $table->data[0][4] = '
'; -$table->data[0][4] .= html_print_submit_button (__('Search'), 'search', false, +$table->data[0][4] .= html_print_submit_button (__('Search'), '', false, 'class="sub search"', true); $table->data[0][4] .= '
'; @@ -273,7 +278,7 @@ $filter = array (); if ($search_type != '') $filter['type'] = $search_type; if ($search_string) - $filter[] = '(name LIKE "%'.$search_string.'%" OR description LIKE "%'.$search_string.'%" OR value LIKE "%'.$search_string.'%")'; + $filter[] = "(name LIKE '%".$search_string."%' OR description LIKE '%".$search_string."%' OR value LIKE '%".$search_string."%')"; $total_templates = alerts_get_alert_templates ($filter, array ('COUNT(*) AS total')); $total_templates = $total_templates[0]['total']; $filter['offset'] = (int) get_parameter ('offset');