if (check_user_defined_rules() && check_group_data_form($params)) { $retour = run_query_group_update($params); if ($retour) { // Set update state only if the update group is public $g = get_group_info($params['group_id']); if ($g['privacy'] == 0) { set_update_state(); } $display['msg'] .= display_ok_msg("$l_group : $l_update_ok"); } else { $display['msg'] .= display_err_msg("$l_group : $l_update_error"); } $display['detail'] = dis_group_consult($params, $obm['uid']); } else { $display['msg'] .= display_err_msg($err['msg']); $params_q = run_query_group_detail($params['group_id']); $display['detail'] = html_group_form($action, $params_q, $params, $err['field']); } } elseif ($action == 'check_delete') { /////////////////////////////////////////////////////////////////////////////// if (check_group_can_delete($params['group_id'])) { $display['msg'] .= display_info_msg($ok_msg, false); $display['detail'] = dis_group_can_delete($params['group_id']); } else { $display['msg'] .= display_warn_msg($err['msg'], false); $display['msg'] .= display_warn_msg($l_cant_delete, false); $display['detail'] = dis_group_consult($params, $obm['uid']); } } elseif ($action == 'delete') {
/** * Retrieve all necessary group data. * Be carefull, there is no verification on parameters. * @param $group_id A group unique identifier. * @param $domain_id A domain identifier. * @param $force Force to perform the SQL request. * @return Array A associative array where keys are SQL fields, or false. */ function getGroupDataFromId ($group_id, $domain_id) { global $obm; if (is_null($group_id)) return false; $backup['obm_domain_id'] = $obm['domain_id']; $obm['domain_id'] = $domain_id; $grp_q = run_query_group_detail($group_id); $group = Array(); foreach ($this->_sqlMap as $key => $key_obm) { if (substr($key, 0, strpos($key, '_')) != "group") continue; if (is_null($grp_q->f($key))) continue; $group[$key_obm] = $grp_q->f($key); } $obm['domain_id'] = $backup['obm_domain_id']; unset($backup); return $group; }