From: hickert Date: Mon, 3 Apr 2006 07:53:33 +0000 (+0000) Subject: added some checks for external hook X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a1ac550563d4c714ce61bc45d85927b48b341047;p=gosa.git added some checks for external hook git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2950 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servRepositorySetup.inc b/plugins/admin/systems/class_servRepositorySetup.inc index 538fed150..b5e5c14f2 100644 --- a/plugins/admin/systems/class_servRepositorySetup.inc +++ b/plugins/admin/systems/class_servRepositorySetup.inc @@ -162,9 +162,12 @@ class servRepositorySetup extends plugin $cmd= search_config($this->config->data['TABS'], "servrepository", "EXTERNAL_HOOK"); if(!empty($cmd)){ $res = shell_exec($cmd); - if(!$res){ - print_red(sprintf(_("Can't execute specified '%s' please check your gosa.conf."),$cmd)); - }else{ + $res2 = trim($res); + if((!$res)){ + print_red(sprintf(_("Can't execute specified EXTERNAL_HOOK '%s' please check your gosa.conf."),$cmd)); + }elseif(empty($res2)){ + print_red(sprintf(_("The specified EXTERNAL_HOOK '%s', specified in your gosa.conf, returns an empty string."),$cmd)); + }else{ $tmp = split("\n",$res); foreach($tmp as $hook){ /* skip empty */