mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2010-03-03 Ramon Novoa <rnovoa@artica.es>
* include/functions_db.php: Use mysql_fetch_assoc instead of mysql_fetch_array to avoid duplicate results (hash and array). * godmode/alerts/configure_alert_template.php: Added 'matches_value' support to 'onchange' alerts. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2457 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2f5021cbf8
commit
28159d9fa0
@ -1,3 +1,11 @@
|
|||||||
|
2010-03-03 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* include/functions_db.php: Use mysql_fetch_assoc instead of
|
||||||
|
mysql_fetch_array to avoid duplicate results (hash and array).
|
||||||
|
|
||||||
|
* godmode/alerts/configure_alert_template.php: Added 'matches_value'
|
||||||
|
support to 'onchange' alerts.
|
||||||
|
|
||||||
2010-03-03 Miguel de Dios <miguel.dedios@artica.es>
|
2010-03-03 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/functions_gis.php: add new parameter to function "addPath" the
|
* include/functions_gis.php: add new parameter to function "addPath" the
|
||||||
|
@ -433,6 +433,9 @@ if ($step == 2) {
|
|||||||
case "min":
|
case "min":
|
||||||
$table->rowstyle['min'] = '';
|
$table->rowstyle['min'] = '';
|
||||||
break;
|
break;
|
||||||
|
case "onchange":
|
||||||
|
$show_matches = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->data[0][0] = __('Name');
|
$table->data[0][0] = __('Name');
|
||||||
@ -525,6 +528,8 @@ var under = "<?php echo __('The alert would fire when the value is below <span i
|
|||||||
var over = "<?php echo __('The alert would fire when the value is above <span id=\"max\"></span>');?>";
|
var over = "<?php echo __('The alert would fire when the value is above <span id=\"max\"></span>');?>";
|
||||||
var warning = "<?php echo __('The alert would fire when the module is in warning status');?>";
|
var warning = "<?php echo __('The alert would fire when the module is in warning status');?>";
|
||||||
var critical = "<?php echo __('The alert would fire when the module is in critical status');?>";
|
var critical = "<?php echo __('The alert would fire when the module is in critical status');?>";
|
||||||
|
var onchange = "<?php echo __('The alert would fire when the module value changes');?>";
|
||||||
|
var onchange_not = "<?php echo __('The alert would fire when the module value does not change');?>";
|
||||||
|
|
||||||
function check_regex () {
|
function check_regex () {
|
||||||
if ($("#type").attr ('value') != 'regex') {
|
if ($("#type").attr ('value') != 'regex') {
|
||||||
@ -641,6 +646,16 @@ $(document).ready (function () {
|
|||||||
/* Show example */
|
/* Show example */
|
||||||
$("span#example").empty ().append (critical);
|
$("span#example").empty ().append (critical);
|
||||||
break;
|
break;
|
||||||
|
case "onchange":
|
||||||
|
$("#template-value, #template-max, #template-min").hide ();
|
||||||
|
$("#template-example, span#matches_value").show ();
|
||||||
|
|
||||||
|
/* Show example */
|
||||||
|
if ($("#checkbox-matches_value")[0].checked)
|
||||||
|
$("span#example").empty ().append (onchange);
|
||||||
|
else
|
||||||
|
$("span#example").empty ().append (onchange_not);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$("#template-value, #template-max, #template-min, #template-example, span#matches_value").hide ();
|
$("#template-value, #template-max, #template-min, #template-example, span#matches_value").hide ();
|
||||||
break;
|
break;
|
||||||
@ -664,6 +679,12 @@ $(document).ready (function () {
|
|||||||
} else {
|
} else {
|
||||||
$("span#example").empty ().append (between_not);
|
$("span#example").empty ().append (between_not);
|
||||||
}
|
}
|
||||||
|
} else if (type == "onchange") {
|
||||||
|
if (enabled) {
|
||||||
|
$("span#example").empty ().append (onchange);
|
||||||
|
} else {
|
||||||
|
$("span#example").empty ().append (onchange_not);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
render_example ();
|
render_example ();
|
||||||
});
|
});
|
||||||
|
@ -2075,7 +2075,7 @@ function process_sql ($sql, $rettype = "affected_rows", $dbconnection = '', $cac
|
|||||||
else {
|
else {
|
||||||
add_database_debug_trace ($sql, 0, mysql_affected_rows (),
|
add_database_debug_trace ($sql, 0, mysql_affected_rows (),
|
||||||
array ('time' => $time));
|
array ('time' => $time));
|
||||||
while ($row = mysql_fetch_array ($result)) {
|
while ($row = mysql_fetch_assoc ($result)) {
|
||||||
array_push ($retval, $row);
|
array_push ($retval, $row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user