2011-08-31 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php: fixed the fields as sql operations as field. Fixes: #3400237 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4863 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
624c2edaff
commit
e9f5fc64cd
|
@ -1,3 +1,9 @@
|
||||||
|
2011-08-31 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_agents.php: fixed the fields as sql operations as field.
|
||||||
|
|
||||||
|
Fixes: #3400237
|
||||||
|
|
||||||
2011-08-31 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-08-31 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_alerts.php: Fixed alerts_get_agents_with_alert_template
|
* include/functions_alerts.php: Fixed alerts_get_agents_with_alert_template
|
||||||
|
|
|
@ -592,15 +592,15 @@ function agents_get_next_contact($idAgent, $maxModules = false) {
|
||||||
* @param bool Wheter to return the modules indexed by the id_agente_modulo or
|
* @param bool Wheter to return the modules indexed by the id_agente_modulo or
|
||||||
* not. Default is indexed.
|
* not. Default is indexed.
|
||||||
* Example:
|
* Example:
|
||||||
<code>
|
<code>
|
||||||
Both are similars:
|
Both are similars:
|
||||||
$modules = agents_get_modules ($id_agent, false, array ('disabled' => 0));
|
$modules = agents_get_modules ($id_agent, false, array ('disabled' => 0));
|
||||||
$modules = agents_get_modules ($id_agent, false, 'disabled = 0');
|
$modules = agents_get_modules ($id_agent, false, 'disabled = 0');
|
||||||
|
|
||||||
Both are similars:
|
Both are similars:
|
||||||
$modules = agents_get_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
$modules = agents_get_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
||||||
$modules = agents_get_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
$modules = agents_get_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
||||||
</code>
|
</code>
|
||||||
*
|
*
|
||||||
* @return array An array with all modules in the agent.
|
* @return array An array with all modules in the agent.
|
||||||
* If multiple rows are selected, they will be in an array
|
* If multiple rows are selected, they will be in an array
|
||||||
|
@ -668,15 +668,15 @@ function agents_common_modules_with_alerts ($id_agent, $filter = false, $indexed
|
||||||
* @param bool Wheter to return the modules indexed by the id_agente_modulo or
|
* @param bool Wheter to return the modules indexed by the id_agente_modulo or
|
||||||
* not. Default is indexed.
|
* not. Default is indexed.
|
||||||
* Example:
|
* Example:
|
||||||
<code>
|
<code>
|
||||||
Both are similars:
|
Both are similars:
|
||||||
$modules = agents_get_modules ($id_agent, false, array ('disabled' => 0));
|
$modules = agents_get_modules ($id_agent, false, array ('disabled' => 0));
|
||||||
$modules = agents_get_modules ($id_agent, false, 'disabled = 0');
|
$modules = agents_get_modules ($id_agent, false, 'disabled = 0');
|
||||||
|
|
||||||
Both are similars:
|
Both are similars:
|
||||||
$modules = agents_get_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
$modules = agents_get_modules ($id_agent, '*', array ('disabled' => 0, 'history_data' => 0));
|
||||||
$modules = agents_get_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
$modules = agents_get_modules ($id_agent, '*', 'disabled = 0 AND history_data = 0');
|
||||||
</code>
|
</code>
|
||||||
*
|
*
|
||||||
* @return array An array with all modules in the agent.
|
* @return array An array with all modules in the agent.
|
||||||
* If multiple rows are selected, they will be in an array
|
* If multiple rows are selected, they will be in an array
|
||||||
|
@ -1010,6 +1010,17 @@ function agents_get_modules ($id_agent = null, $details = false, $filter = false
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (strstr($value, '666=666', true) == '') {
|
||||||
|
switch ($config['dbtype']) {
|
||||||
|
case "mysql":
|
||||||
|
case "postgresql":
|
||||||
|
array_push ($fields, ' '.$value);
|
||||||
|
break;
|
||||||
|
case "oracle":
|
||||||
|
array_push ($fields, ' '.$value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
|
|
Loading…
Reference in New Issue