From: hickert Date: Thu, 1 Jul 2010 14:08:54 +0000 (+0000) Subject: Added ability to return command results in plugin::callHook X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cab11b30f4ac65db8660a627c2e46411bca3520c;p=gosa.git Added ability to return command results in plugin::callHook git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18906 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/password-methods/class_password-methods.inc b/gosa-core/include/password-methods/class_password-methods.inc index 808d5950e..b933300e1 100644 --- a/gosa-core/include/password-methods/class_password-methods.inc +++ b/gosa-core/include/password-methods/class_password-methods.inc @@ -336,8 +336,15 @@ class passwordMethod { if($config->configRegistry->propertyExists('core', 'passwordProposalHook')){ $value = $config->configRegistry->getPropertyValue('core', 'passwordProposalHook'); - echo $value; + $core = new core($config); + + // No execute the hook and fetch the results. + plugin::callHook($core, 'passwordProposalHook', $addAttrs= array(), $ret); + if(count($ret) && !empty($ret[0])){ + return($ret[0]); + } } + return(''); }