summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 240bf84)
raw | patch | inline | side by side (parent: 240bf84)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Jan 2010 14:30:51 +0000 (14:30 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Jan 2010 14:30:51 +0000 (14:30 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15089 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index c65f150a4eb2f2152f44ae0f6291ae845ae44410..7c7f93e68f61006cdd9ae896a78ab8b0e5e73878 100644 (file)
if(isset($_GET['act']) && $_GET['act'] == "remove_branch") $action['action'] = "removeBranch";
foreach($_POST as $name => $value){
- if(preg_match("/^edit_([0-9]*)_([a-z]*)_(x|y)/i", $name)){
- $id = preg_replace("/^edit_([0-9]*)_([a-z]*)_(x|y)/i","\\1", $name);
- $tab = preg_replace("/^edit_([0-9]*)_([a-z]*)_(x|y)/i","\\2", $name);
+ if(preg_match("/^edit_([0-9]*)_([a-z_]*)_(x|y)/i", $name)){
+ $id = preg_replace("/^edit_([0-9]*)_([a-z_]*)_(x|y)/i","\\1", $name);
+ $tab = preg_replace("/^edit_([0-9]*)_([a-z_]*)_(x|y)/i","\\2", $name);
+
$headpage = $this->getHeadpage();
- if(isset($headpage->entries[$id]['GROUPS'][$tab])){
- $data =$headpage->entries[$id]['GROUPS'][$tab];
- $type = $this->get_type($data);
- $str = management::editEntry('editEntry',array($data['dn']),array(),$type[0],$type[2],$type[1]);
+ $entry = $headpage->entries[$id];
+
+ if(in_array('FAKE_OC_FAI', $entry['objectClass'])){
+ if(isset($headpage->entries[$id]['GROUPS'][$tab])){
+ $data =$headpage->entries[$id]['GROUPS'][$tab];
+ $type = $this->get_type($data);
+ $str = management::editEntry('editEntry',array($data['dn']),array(),$type[0],$type[2],$type[1]);
+ if($str) return($str);
+ }
+ }else{
+ $str = $this->editEntry('editEntry',array($entry['dn']));
if($str) return($str);
- }
+ }
break;
}
}