From 998990b2ea9e434f06df0ea71909544d83f9033b Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 24 Jan 2011 13:27:24 +0000 Subject: [PATCH] Updated hook handling, replacements with _ were not replaced. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20608 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 22670325a..1e13afa0f 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -3710,7 +3710,7 @@ function fillReplacements($str, $attrs, $shellArg = FALSE, $default = "") // Get all matching parts of the given string and sort them by // length, to avoid replacing strings like '%uidNumber' with 'uid' // instead of 'uidNumber'; The longest tring at first. - preg_match_all('/(\{?%([a-z0-9]+)(\[(([0-9]+)(\-([0-9]+))?)\])?\}?)/i', $str ,$matches, PREG_SET_ORDER); + preg_match_all('/(\{?%([a-z0-9_]+)(\[(([0-9_]+)(\-([0-9_]+))?)\])?\}?)/i', $str ,$matches, PREG_SET_ORDER); $hits = array(); foreach($matches as $match){ $hits[strlen($match[2]).$match[0]] = $match; -- 2.30.2