Code

Updated samba tab
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jan 2009 14:25:52 +0000 (14:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jan 2009 14:25:52 +0000 (14:25 +0000)
-fixed minor probmlems

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13351 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/samba/personal/samba/class_sambaAccount.inc
gosa-plugins/samba/personal/samba/samba3.tpl

index 56ebe58d98591676a222dab6e1e2cb6f31e45ff4..bd3b566868d63343e7ff38f1a278806a14b6c7ea 100644 (file)
@@ -76,6 +76,7 @@ class sambaAccount extends plugin
   var $mungedObject;
 
   /* Helper */
+  var $cache = array();
   var $show_ws_dialog= FALSE;
   var $logon_time_set= 0;
   var $logoff_time_set= 0;
@@ -806,14 +807,10 @@ class sambaAccount extends plugin
     $ldap = $this->config->get_ldap_link();
     $ldap->cd($this->config->current['BASE']);
     if(!empty($this->sambaDomainName) && isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName])){
-      $cfg = $this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName];
-      $ldap->search("(&(objectClass=sambaDomain)(sambaSID=".$cfg['SID']."))",array("*"));
-      if($ldap->count() >= 1){
-        $attrs = $ldap->fetch();
-        foreach($domain_attributes as $attr){
-          if(isset($attrs[$attr])){
-            $$attr = $attrs[$attr][0];
-          }
+      $attrs = $this->get_domain_info();
+      foreach($domain_attributes as $attr){
+        if(isset($attrs[$attr])){
+          $$attr = $attrs[$attr][0];
         }
       }
     }
index 3561a208341d8e49a36ef1e1d33f89d6cae46e51..816b75fa17fc9c2aafc80675079f8b2792f7bfac 100644 (file)
@@ -27,7 +27,7 @@
      <td>
 {render acl=$sambaDomainNameACL  checkbox=$multiple_support checked=$use_sambaDomainName}
       <select id="sambaDomainName" size="1" name="sambaDomainName"
-       {if $display_information} onChange="document.mainform.submit();" {/if}>
+       onChange="document.mainform.submit();">
        {html_options values=$domains output=$domains selected=$sambaDomainName}
       </select>
 {/render}