mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: fixed the function "api_get_policies". Thanks Cucumber. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9495 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
66c459e425
commit
6d579568a9
@ -1,3 +1,8 @@
|
|||||||
|
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_api.php: fixed the function "api_get_policies".
|
||||||
|
Thanks Cucumber.
|
||||||
|
|
||||||
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
|
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/functions_api.php: fixed the function
|
* include/functions_api.php: fixed the function
|
||||||
|
@ -1167,14 +1167,14 @@ function api_get_policies($thrash1, $thrash2, $other, $thrash3) {
|
|||||||
$where = '';
|
$where = '';
|
||||||
|
|
||||||
if ($other['data'][0] != "") {
|
if ($other['data'][0] != "") {
|
||||||
$where .= ' AND id_agent = ' . $other['data'][0];
|
$where .= ' AND pol_agents.id_agent = ' . $other['data'][0];
|
||||||
|
|
||||||
$sql = sprintf("SELECT policy.id, name, id_agent
|
$sql = sprintf("SELECT policy.id, name, id_agent
|
||||||
FROM tpolicies policy, tpolicy_agents pol_agents
|
FROM tpolicies AS policy, tpolicy_agents AS pol_agents
|
||||||
WHERE policy.id = pol_agents.id %s", $where);
|
WHERE policy.id = pol_agents.id_policy %s", $where);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql = "SELECT id, name FROM tpolicies policy";
|
$sql = "SELECT id, name FROM tpolicies AS policy";
|
||||||
}
|
}
|
||||||
|
|
||||||
$policies = db_get_all_rows_sql($sql);
|
$policies = db_get_all_rows_sql($sql);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user