summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87a3182)
raw | patch | inline | side by side (parent: 87a3182)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 10 Nov 2006 06:07:29 +0000 (06:07 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 10 Nov 2006 06:07:29 +0000 (06:07 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5063 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/netatalk/class_netatalk.inc | patch | blob | history |
diff --git a/plugins/personal/netatalk/class_netatalk.inc b/plugins/personal/netatalk/class_netatalk.inc
index ad52179cb1283208aae7411988ae9c5fde302d7f..49a90a39d1273cf80cd572292a6b905a20e2faf1 100644 (file)
$ldap = $this->config->get_ldap_link();
if($this->dn === "new" || $this->dn == NULL) {
- $ldap->cd($this->parent->by_object['user']->base);
+ $base = $_SESSION['CurrentMainBase'];
} else {
- $ldap->cd ($this->dn);
- $ldap->cd ('..'); $ldap->cd ('..');
+ $base = preg_replace("/^[^,]+,".normalizePreg(get_people_ou())."/","",$this->dn);
}
+
+ $ldap->cd($base);
$ldap->search ("(&(objectClass=mount)(|(mountType=url)(mountType=nfs))(cn=*))");
- /* Show tab dialog headers */
- if ($this->parent != NULL) {
- if ($this->is_account) {
- $display = $this->show_header(_("Remove netatalk account"),
- _("This account has netatalk features enabled. You can disable them by clicking below."));
- } else {
- $errmsg="";
- $obj = $this->parent->by_object['posixAccount'];
- if (!($obj->is_account) ) {
- $errmsg.="Posix features are needed for netatalk accounts, enable them first. ";
- }
- if ($ldap->count() == 0) {
- $errmsg.="At least one share with netatalk or NFS mount entry needed.";
- }
- if($errmsg==""){
- $display = $this->show_header(_("Create netatalk account"),
- _("This account has netatalk features disabled. You can enable them by clicking below."));
- } else {
- $display = $this->show_header(_("Create netatalk account"), _($errmsg), TRUE);
- }
- return ($display);
- }
- }
-
while ($attrs = $ldap->fetch()){
$tmp = split(":", $attrs["cn"][0]);
$host = trim($tmp[0]);
return ($display);
}
+ /* Show tab dialog headers */
+ if ($this->parent != NULL) {
+ if ($this->is_account) {
+ $display = $this->show_header(_("Remove netatalk account"),
+ _("This account has netatalk features enabled. You can disable them by clicking below."));
+ } else {
+ $errmsg="";
+ $obj = $this->parent->by_object['posixAccount'];
+ if (!($obj->is_account) ) {
+ $errmsg.="Posix features are needed for netatalk accounts, enable them first. ";
+ }
+ if ($ldap->count() == 0) {
+ $errmsg.="At least one share with netatalk or NFS mount entry needed.";
+ }
+ if($errmsg==""){
+ $display = $this->show_header(_("Create netatalk account"),
+ _("This account has netatalk features disabled. You can enable them by clicking below."));
+ } else {
+ $display = $this->show_header(_("Create netatalk account"), _($errmsg), TRUE);
+ }
+ return ($display);
+ }
+ }
$smarty->assign("netatalkShareACL", chkacl($this->acl, "netatalkShare"));
$smarty->assign("netatalkUserHomepathACL", chkacl($this->acl, "netatalkUserHomepath"));