From e186bf1131c8c311d2160dec7a5305c3bef6986f Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 6 May 2008 11:15:57 +0000 Subject: [PATCH] Fixed si error handling 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 | 2 +- gosa-core/include/class_gosaSupportDaemon.inc | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gosa-core/include/class_config.inc b/gosa-core/include/class_config.inc index d5f682142..ee84530f9 100644 --- a/gosa-core/include/class_config.inc +++ b/gosa-core/include/class_config.inc @@ -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], diff --git a/gosa-core/include/class_gosaSupportDaemon.inc b/gosa-core/include/class_gosaSupportDaemon.inc index c99444b1a..fcccd5843 100644 --- a/gosa-core/include/class_gosaSupportDaemon.inc +++ b/gosa-core/include/class_gosaSupportDaemon.inc @@ -129,8 +129,16 @@ class gosaSupportDaemon public function get_error() { $str = $this->s_error; - $str = preg_replace("/ /"," ",$str); - return($str); + $ret = ""; + if(is_string($str)){ + $ret = $str; + }else{ + foreach($str as $msg){ + $ret .= $msg." "; + } + } + $ret = preg_replace("/ /"," ",$ret); + return($ret); } -- 2.30.2