Code

Fixed si error handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 May 2008 11:15:57 +0000 (11:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 May 2008 11:15:57 +0000 (11:15 +0000)
Updated config kerberos server gathering.

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

gosa-core/include/class_config.inc
gosa-core/include/class_gosaSupportDaemon.inc

index d5f68214266fc1497d9b34c2041c5534e833c108..ee84530f925050b2dd0ff5090a1d1faaeba7f69f 100644 (file)
@@ -384,7 +384,7 @@ class config  {
 
     /* Get kerberos server. FIXME: only one is supported currently */
     $ldap->cd ($this->current['BASE']);
-    $ldap->search ("(objectClass=goKrbServer)");
+    $ldap->search ("(&(goKrbRealm=*)(goKrbAdmin=*)(objectClass=goKrbServer))");
     if ($ldap->count()){
       $attrs= $ldap->fetch();
       $this->data['SERVERS']['KERBEROS']= array( 'SERVER' => $attrs['cn'][0],
index c99444b1a536acb59460697f648cc20065e6541a..fcccd5843bb22ea457bd8fca0aeb3de6e6b6b18b 100644 (file)
@@ -129,8 +129,16 @@ class gosaSupportDaemon
   public function get_error()
   {
     $str = $this->s_error;
-    $str = preg_replace("/ /","&nbsp;",$str);
-    return($str);
+    $ret = "";
+    if(is_string($str)){
+      $ret = $str;
+    }else{
+      foreach($str as $msg){
+        $ret .= $msg." ";
+      }
+    }
+    $ret = preg_replace("/ /","&nbsp;",$ret);
+    return($ret);
   }