diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc
index eec9adf02ce43d5b9d99100d8578e65fd61ddef3..27ad5c002bd9f29a56a6d8104ad5d8a94aec92b6 100644 (file)
$this->config->make_idepartments();
$smarty= get_smarty();
- /* Hide base selector, if this object represents the base itself
- */
- $smarty->assign("hide_base", FALSE);
- if($this->dn == $this->config->current['BASE']){
- $smarty->assign("hide_base", TRUE);
- }
-
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translation){
$smarty->assign($name."ACL",$this->getacl($name));
}
+ /* Hide base selector, if this object represents the base itself
+ */
+ $smarty->assign("is_root_dse", FALSE);
+ if($this->dn == $this->config->current['BASE']){
+ $smarty->assign("is_root_dse", TRUE);
+ $nA = $this->namingAttr."ACL";
+ $smarty->assign($nA,$this->getacl($this->namingAttr,TRUE));
+ }
+
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
/* Set admin unit flag */
if ($this->is_administrational_unit) {
- $smarty->assign("unitTag", "checked");
+ $smarty->assign("gosaUnitTag", "checked");
} else {
- $smarty->assign("unitTag", "");
+ $smarty->assign("gosaUnitTag", "");
}
$smarty->assign("dep_type",$this->type);
/* Save data to object */
function save_object()
{
- if (isset($_POST['dep_generic_posted'])){
+ if (isset($_POST['dep_generic_posted'])){
+
+ $nA = $this->namingAttr;
+ $old_nA = $this->$nA;
+
+
/* Create a base backup and reset the
base directly after calling plugin::save_object();
}
/* Save tagging flag */
- if ($this->acl_is_writeable("unitTag")){
- if (isset($_POST['unitTag'])){
+ if ($this->acl_is_writeable("gosaUnitTag")){
+ if (isset($_POST['is_administrational_unit'])){
$this->is_administrational_unit= true;
} else {
$this->is_administrational_unit= false;
}
}
+
+ /* If this is the root directory service entry (rootDSE)
+ then avoid changing the naming attribute of this entry.
+ */
+ if($this->dn == $this->config->current['BASE']){
+ $this->$nA = $old_nA;
+ }
}
}
}
/* This one matches with the latter part. Break and don't fix this entry */
- if (preg_match('/(^|,)'.normalizePreg($key).'$/', $attrs['dn'])){
+ if (preg_match('/(^|,)'.preg_quote($key).'$/', $attrs['dn'])){
$fix= false;
break;
}
if(!$OnlySetTagFlag){
$this->must_be_tagged = FALSE;
echo '<p class="seperator"> </p>';
- echo "<div style='width:100%;text-align:right;'><form name='form' method='post' action='?plug=".$_GET['plug']."' target='_parent'>
- <br><input type='submit' name='back' value='"._("Continue")."'>
- </form></div>";
+ echo "<div style='width:100%;text-align:right;'>".
+ "<form name='form' method='post' action='?plug=".$_GET['plug']."' target='_parent'>".
+ "<br>".
+ "<input type='submit' name='back' value='"._("Continue")."'>".
+ "<input type='hidden' name='php_c_check' value='1'>".
+ "</form>".
+ "</div>";
echo "<script language=\"javascript\" type=\"text/javascript\">scrollDown2();</script>" ;
}
}
"plSelfModify" => FALSE,
"plPriority" => 0,
"plDepends" => array(),
- "plSection" => array("admin"),
+ "plSection" => array("administration"),
"plCategory" => array("department" => array("objectClass" => "gosaDepartment", "description" => _("Departments"))),
"plProvidedAcls" => array(
- "description" => _("Description"),
- "c" => _("Country"),
- "base" => _("Base"),
- "l" => _("Location"),
- "telephoneNumber" => _("Telephone"),
"ou" => _("Department name"),
+ "description" => _("Description"),
"businessCategory" => _("Category"),
+ "base" => _("Base"),
+
"st" => _("State"),
+ "l" => _("Location"),
"postalAddress" => _("Address"),
- "gosaUnitTag" => _("Administrative settings"),
- "facsimileTelephoneNumber" => _("Fax"))
+ "telephoneNumber" => _("Telephone"),
+ "facsimileTelephoneNumber" => _("Fax"),
+
+ "gosaUnitTag" => _("Administrative settings"))
));
}
}
/* This one matches with the latter part. Break and don't fix this entry */
- if (preg_match('/(^|,)'.normalizePreg($key).'$/', $dn)){
+ if (preg_match('/(^|,)'.preg_quote($key).'$/', $dn)){
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "DEBUG: Possibly relevant: $key", "Tagging");
$relevant[strlen($key)]= $ntag;
continue;