2011-09-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: added the "getgroups" call. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4963 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
863a8c3047
commit
c50a846a87
|
@ -1,3 +1,7 @@
|
|||
2011-09-16 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_api.php: added the "getgroups" call.
|
||||
|
||||
2011-09-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_agents.php: Avoid bad syntax sql query
|
||||
|
|
|
@ -153,6 +153,32 @@ function isInACL($ip) {
|
|||
}
|
||||
|
||||
//-------------------------DEFINED OPERATIONS FUNCTIONS-------------------------
|
||||
function get_groups($thrash1, $thrash2, $other, $returnType, $user_in_db) {
|
||||
if ($other['type'] == 'string') {
|
||||
if ($other['data'] != '') {
|
||||
returnError('error_parameter', 'Error in the parameters.');
|
||||
return;
|
||||
}
|
||||
else {//Default values
|
||||
$separator = ';';
|
||||
}
|
||||
}
|
||||
else if ($other['type'] == 'array') {
|
||||
$separator = $other['data'][0];
|
||||
}
|
||||
|
||||
$groups = users_get_groups ($user_in_db, "IR");
|
||||
|
||||
$data_groups = array();
|
||||
foreach ($groups as $id => $group) {
|
||||
$data_groups[] = array($id, $group);
|
||||
}
|
||||
|
||||
$data['type'] = 'array';
|
||||
$data['data'] = $data_groups;
|
||||
|
||||
returnData($returnType, $data, $separator);
|
||||
}
|
||||
|
||||
function get_agent_module_name_last_value($agentName, $moduleName, $other = ';', $returnType)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue