Fixed view and call funtions, dont work in Oracle's DB. Tiquet: #3231
(cherry picked from commit 64b2ad8f6b
)
This commit is contained in:
parent
ab1de36d0e
commit
cfcc6b40ea
|
@ -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] = '<div class="action-buttons">';
|
||||
$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] .= '</div>';
|
||||
|
||||
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue