2012-01-23 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_api.php: Modified get_policy_modules function. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5400 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3ed66be052
commit
be2b4b7d10
|
@ -1,3 +1,7 @@
|
|||
2012-01-23 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_api.php: Modified get_policy_modules function.
|
||||
|
||||
2012-01-23 Koichiro Kikuchi <koichiro@rworks.jp>
|
||||
|
||||
* include/functions_servers.php: Exclude modules which belong to
|
||||
|
|
|
@ -980,10 +980,13 @@ function get_policy_modules($thrash1, $thrash2, $other, $thrash3) {
|
|||
returnError('error_policy_modules', 'Error retrieving policy modules. Id_policy cannot be left blank.');
|
||||
return;
|
||||
}
|
||||
|
||||
$sql = sprintf("select policy.id, policy.name, pol_modules.id id_module FROM tpolicies policy, tpolicy_modules pol_modules where policy.id = pol_modules.id_policy AND policy.id = %d", $other['data'][0]);
|
||||
|
||||
$policies = db_get_all_rows_sql($sql);
|
||||
|
||||
$policies = enterprise_hook('policies_get_modules_api', array($other['data'][0], $other['data'][1]));
|
||||
|
||||
if ($policies === ENTERPRISE_NOT_HOOK){
|
||||
returnError('error_policy_modules', 'Error retrieving policy modules.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (count($policies) > 0 and $policies !== false){
|
||||
$data = array('type' => 'array', 'data' => $policies);
|
||||
|
|
Loading…
Reference in New Issue