2012-10-26 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: fixed the function "api_set_apply_all_policies". Fixes: #3576289 * include/functions.php, include/functions_filemanager.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7099 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4c16ac1d13
commit
16324125b9
|
@ -1,3 +1,13 @@
|
|||
2012-10-26 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_api.php: fixed the function
|
||||
"api_set_apply_all_policies".
|
||||
|
||||
Fixes: #3576289
|
||||
|
||||
* include/functions.php, include/functions_filemanager.php: cleaned
|
||||
source code style.
|
||||
|
||||
2012-10-26 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* include/functions_reporting.php,
|
||||
|
|
|
@ -2780,7 +2780,6 @@ function api_set_add_agent_policy($id, $thrash1, $other, $thrash3) {
|
|||
returnData('string', array('type' => 'string', 'data' => $success));
|
||||
else
|
||||
returnError('error_add_agent_policy', 'Error adding agent to policy.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3647,13 +3646,13 @@ function api_set_apply_policy($id, $thrash1, $other, $thrash3) {
|
|||
*
|
||||
* @param $thrash3 Don't use
|
||||
*/
|
||||
function api_set_apply_all_policies($id, $thrash1, $other, $thrash3) {
|
||||
function api_set_apply_all_policies($thrash1, $thrash2, $other, $thrash3) {
|
||||
$policies = array();
|
||||
|
||||
# Get all policies
|
||||
$policies = enterprise_hook('policies_get_policies', array(false, false, false, true));
|
||||
|
||||
if ($duplicated === ENTERPRISE_NOT_HOOK) {
|
||||
if ($policies === ENTERPRISE_NOT_HOOK) {
|
||||
returnError('error_apply_all_policy', __('Error applying all policies.'));
|
||||
return;
|
||||
}
|
||||
|
@ -3661,7 +3660,8 @@ function api_set_apply_all_policies($id, $thrash1, $other, $thrash3) {
|
|||
$num_policies = count($policies);
|
||||
$count_results = 0;
|
||||
foreach ($policies as $policy) {
|
||||
$return_value = set_apply_policy($policy['id'], '', 'return', '');
|
||||
$return_value = enterprise_hook('add_policy_queue_operation',
|
||||
array($policy['id'], 0, 'apply'));
|
||||
|
||||
if ($return_value != -1) {
|
||||
$count_results++;
|
||||
|
|
Loading…
Reference in New Issue