From: hickert Date: Thu, 19 May 2005 09:40:07 +0000 (+0000) Subject: removed undefined index in line.... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7fd1693a64a3dd902bd29f54639761690d445556;p=gosa.git removed undefined index in line.... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@254 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDB.inc b/plugins/admin/systems/class_servDB.inc index 4244e40dd..1df3e2251 100644 --- a/plugins/admin/systems/class_servDB.inc +++ b/plugins/admin/systems/class_servDB.inc @@ -74,8 +74,12 @@ class servdb extends plugin foreach ($this->additionaloc as $oc => $dummy){ if (isset($this->objectclasses[$oc])){ $smarty->assign("$oc", "checked"); + $smarty->assign("$oc"."State", ""); $smarty->assign("$oc"."ACL", chkacl($this->acl, $oc)); + } else { + $smarty->assign("$oc", ""); + $smarty->assign("$oc"."ACL", ""); $smarty->assign("$oc"."State", "disabled"); } } @@ -176,12 +180,6 @@ class servdb extends plugin unset($tmp[$key]); } - foreach($tmp as $val){ - if(in_array($val,$test)){ - $tmp[$val]; - } - } - $classes = (array_flip(array_merge(array_flip($test),$tmp))); unset($this->attrs['objectClass']); @@ -205,6 +203,7 @@ class servdb extends plugin /* Write to LDAP */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->dn); + // print_a($this->attrs); $ldap->modify($this->attrs); show_ldap_error($ldap->get_error()); diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc index 571311494..b596f22cb 100644 --- a/plugins/admin/systems/class_servService.inc +++ b/plugins/admin/systems/class_servService.inc @@ -138,15 +138,23 @@ class servservice extends plugin foreach ($this->attributes as $attr){ $smarty->assign("$attr", $this->$attr); $smarty->assign("$attr"."ACL", chkacl($this->acl, $attr)); + if($this->$attr) + $smarty->assign($attr."State",""); + else + $smarty->assign($attr."State","disabled"); } /* Classes... */ - foreach ($this->additionaloc as $oc => $dummy){ +foreach ($this->additionaloc as $oc => $dummy){ if (isset($this->objectclasses[$oc])){ $smarty->assign("$oc", "checked"); + $smarty->assign("$oc"."State", ""); $smarty->assign("$oc"."ACL", chkacl($this->acl, $oc)); + } else { + $smarty->assign("$oc", ""); + $smarty->assign("$oc"."ACL", ""); $smarty->assign("$oc"."State", "disabled"); } } @@ -203,17 +211,14 @@ class servservice extends plugin $test = $this->objectclasses; $tmp = array_flip($this->attrs['objectClass']); + + foreach($this->additionaloc as $key=>$val) { unset($tmp[$key]); } - - foreach($tmp as $val){ - if(in_array($val,$test)){ - $tmp[$val]; - } - } - + + $classes = (array_flip(array_merge(array_flip($test),$tmp))); unset($this->attrs['objectClass']); @@ -233,9 +238,8 @@ class servservice extends plugin } $this->attrs = array_reverse($this->attrs); - - - +// print_a($this->attrs); + /* Write to LDAP */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->dn); diff --git a/plugins/admin/systems/servdb.tpl b/plugins/admin/systems/servdb.tpl index 424996d1e..b42f22c9f 100644 --- a/plugins/admin/systems/servdb.tpl +++ b/plugins/admin/systems/servdb.tpl @@ -28,7 +28,7 @@ - + @@ -44,7 +44,7 @@
{t}FAX DB user{/t}
{t}Password{/t}
- + diff --git a/plugins/admin/systems/servservice.tpl b/plugins/admin/systems/servservice.tpl index a4e8dc181..c938c2224 100644 --- a/plugins/admin/systems/servservice.tpl +++ b/plugins/admin/systems/servservice.tpl @@ -12,7 +12,7 @@
{t}Asterisk DB user{/t}
{t}Password{/t}
- {html_options values=$goExportEntry output=$goExportEntry}
@@ -37,7 +37,7 @@
- {html_options values=$goTimeSource output=$goTimeSource}