Code

removed undefined index in line....
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 May 2005 09:40:07 +0000 (09:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 May 2005 09:40:07 +0000 (09:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@254 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servDB.inc
plugins/admin/systems/class_servService.inc
plugins/admin/systems/servdb.tpl
plugins/admin/systems/servservice.tpl

index 4244e40dd8252b298da643c4aa7a55578883a098..1df3e2251d610642e9a2c44e02ec25e155238f1e 100644 (file)
@@ -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());
 
index 57131149446dd6af1ec1d1157f83d68ce479da9c..b596f22cb485a7bce37d282a3de479636afa2544 100644 (file)
@@ -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);
index 424996d1e84ab67bcc8431fe9372c8b8f98d6a16..b42f22c9fc5f5bde26a1e2c0f574ac55c62125ef 100644 (file)
@@ -28,7 +28,7 @@
    <table>
     <tr>
         <td>{t}FAX DB user{/t}</td>
-        <td><input name="goFaxAdmin" size=30 maxlength=60 {$goFaxACL} id="goFaxAdmin" value="{$goFaxAdmin}" {$goFaxServerState}></td>
+        <td><input name="goFaxAdmin" size=30 maxlength=60 {$goFaxAdminACL} id="goFaxAdmin" value="{$goFaxAdmin}" {$goFaxServerState}></td>
        </tr>
     <tr>
         <td>{t}Password{/t}</td>
@@ -44,7 +44,7 @@
    <table>
     <tr>
         <td>{t}Asterisk DB user{/t}</td>
-        <td><input name="goFonAdmin" size=30 maxlength=60 id="goFonAdmin" {$goFonACL} value="{$goFonAdmin}" {$goFonServerState}></td>
+        <td><input name="goFonAdmin" size=30 maxlength=60 id="goFonAdmin" {$goFonServerACL} value="{$goFonAdmin}" {$goFonServerState}></td>
        </tr>
     <tr>
         <td>{t}Password{/t}</td>
index a4e8dc181fa87c80d7eaedf49c701834bfbf2abd..c938c2224d74086949ca7b91959a66a70976e5c0 100644 (file)
@@ -12,7 +12,7 @@
    <table>
     <tr>
      <td>
-               <select style="width:350px;" id="goExportEntry" name="goExportEntry" {$goNfsServerState} size=4 multiple {$trustmodeACL} {$trusthide}>
+               <select style="width:350px;" id="goExportEntry" name="goExportEntry" {$goNfsServerState} size=4 multiple >
                {html_options values=$goExportEntry output=$goExportEntry}
            </select>
        <br>    
@@ -37,7 +37,7 @@
    <table>
     <tr>
      <td>
-        <select style="width:350px;" id="goTimeEntry" name="goTimeSource" {$goNtpServerState} size=4 multiple {$trustmodeACL} {$trusthide}>
+        <select style="width:350px;" id="goTimeEntry" name="goTimeSource" {$goNtpServerState} size=4 multiple>
             {html_options values=$goTimeSource output=$goTimeSource}
         </select>
     <br>