summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e7a282f)
raw | patch | inline | side by side (parent: e7a282f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 16 Jan 2006 13:45:50 +0000 (13:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 16 Jan 2006 13:45:50 +0000 (13:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2489 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiManagement.inc | patch | blob | history |
index 636c115caf1b2111dce530595b3385cd0a02ce73..4319f5ed60638c5fe6b58444ee9aa958ddf7a526 100644 (file)
/* Headpage attributes */
var $departments= array();
var $deptabs= NULL;
+ var $lock_type = ""; // should be branch/freeze
+ var $lock_name = "";
+ var $lock_dn = "";
/* attribute list for save action */
- var $attributes = array(); // Attributes Managed by this plugin, none,
+ var $attributes = array("lock_type","lock_name","lock_dn"); // Attributes Managed by this plugin, none,
// because this is only an overview over all objects already defined in FAI.
var $objectclasses = array(); // ObjectClasses which the attributes are related to
var $dialog = array(); // This object contains every dialog we have currently opened
$ldap->cd ($this->config->current['BASE']);
$ldap->copy_FAI_resource_recursive($baseToUse,"ou=".$name.",".$baseToUse,"branch",true);
-
+
+ /* Postcreate */
+
+ /* Assign possible attributes */
+ $this->lock_type = "branch";
+ $this->lock_name = $name;
+ $this->lock_dn = "ou=".$name.",".$baseToUse;
+ $this->postcreate();
$this->dispNewBranch = false;
}
}
$br = $this->getBranches();
if(isset($br[$bb])){
+
+ $name = $br[$bb];
+
$ldap->cd($bb);
$ldap->recursive_remove();
$faifilter['branch'] = "main";
+
+ /* Post remove */
+
+// $this->lock_type is set from this->reload
+ $this->lock_name = $name;
+ $this->lock_dn = $bb;
+
+ $this->postremove();
}
}
$ldap->copy_FAI_resource_recursive($baseToUse,"ou=".$name.",".$baseToUse,"freeze",true);
$this->dispNewFreeze = false;
+
+ /* Postcreate */
+
+ /* Assign possible attributes */
+ $this->lock_type = "branch";
+ $this->lock_name = $name;
+ $this->lock_dn = "ou=".$name.",".$baseToUse;
+ $this->postcreate();
}
}
$res= get_list($this->ui->subtreeACL, "(objectClass=organizationalUnit)",
FALSE, $base, array("cn","description","objectClass"),TRUE);
+ $str = "";
+
foreach($res as $objecttypes){
$res2 = get_list($this->ui->subtreeACL, "(&(objectClass=*)(cn=".$regex."))",
FALSE, $objecttypes['dn'], array("cn","description","objectClass","FAIclass","FAIstate"),TRUE);
if(isset($object['FAIstate'])){
$obj['FAIstate'] = $object['FAIstate'][0];
+
+ /* Append type to this string, to be able to check if the selected
+ * entry is of type 'freeze' or 'branch'
+ */
+ $str.="|".$obj['FAIstate'];
}else{
$obj['FAIstate'] ="";
}
}
}
+
+ /* Tell class what we have currently opened
+ 'main' has type ''
+ */
+ if(preg_match("/freeze/",$str)){
+ $this->lock_type = "freeze";
+ }elseif(preg_match("/branch/",$str)){
+ $this->lock_type = "branch";
+ }else{
+ $this->lock_type = "";
+ }
+
ksort($this->objects);
reset ($this->objects);