2013-10-31 Hirofumi Kosaka <kosaka@rworks.jp>
* include/functions_api.php: Added some parameters to 'create_group' API function. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8987 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
77aae4ab07
commit
e75eef0711
|
@ -1,3 +1,8 @@
|
||||||
|
2013-10-31 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||||
|
|
||||||
|
* include/functions_api.php: Added some parameters to
|
||||||
|
'create_group' API function.
|
||||||
|
|
||||||
2013-10-30 Sergio Martin <sergio.martin@artica.es>
|
2013-10-30 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* godmode/setup/performance.php: Added tip messages to
|
* godmode/setup/performance.php: Added tip messages to
|
||||||
|
|
|
@ -4083,34 +4083,41 @@ function api_set_create_group($id, $thrash1, $other, $thrash3) {
|
||||||
returnError('error_create_group', __('Error in group creation. Group_name cannot be left blank.'));
|
returnError('error_create_group', __('Error in group creation. Group_name cannot be left blank.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][0] == "") {
|
if ($other['data'][0] == "") {
|
||||||
returnError('error_create_group', __('Error in group creation. Icon_name cannot be left blank.'));
|
returnError('error_create_group', __('Error in group creation. Icon_name cannot be left blank.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][1] != "") {
|
$safe_other_data = io_safe_input($other['data']);
|
||||||
$group = groups_get_group_by_id($other['data'][1]);
|
|
||||||
|
if ($safe_other_data[1] != "") {
|
||||||
|
$group = groups_get_group_by_id($safe_other_data[1]);
|
||||||
|
|
||||||
if ($group == false) {
|
if ($group == false) {
|
||||||
returnError('error_create_group', __('Error in group creation. Id_parent_group doesn\'t exists.'));
|
returnError('error_create_group', __('Error in group creation. Id_parent_group doesn\'t exists.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($other['data'][1] != "") {
|
if ($safe_other_data[1] != "") {
|
||||||
$values = array(
|
$values = array(
|
||||||
'icon' => $other['data'][0],
|
'icon' => $safe_other_data[0],
|
||||||
'parent' => $other['data'][1],
|
'parent' => $safe_other_data[1],
|
||||||
'description' => $other['data'][2]
|
'description' => $safe_other_data[2]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$values = array(
|
$values = array(
|
||||||
'icon' => $other['data'][0],
|
'icon' => $safe_other_data[0],
|
||||||
'description' => $other['data'][2]
|
'description' => $safe_other_data[2]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$values['propagate'] = $safe_other_data[3];
|
||||||
|
$values['disabled'] = $safe_other_data[4];
|
||||||
|
$values['custom_id'] =$safe_other_data[5];
|
||||||
|
$values['contact'] = $safe_other_data[6];
|
||||||
|
$values['other'] = $safe_other_data[7];
|
||||||
|
|
||||||
$id_group = groups_create_group($group_name, $values);
|
$id_group = groups_create_group($group_name, $values);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue