From d077b1abf78c1919e7f949c50b155d35d321e82a Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 14 Jan 2011 15:55:34 +0000 Subject: [PATCH] Updated placeholder handling in templates, case is ignored now. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20595 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index fde2df70e..22670325a 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -3717,11 +3717,14 @@ function fillReplacements($str, $attrs, $shellArg = FALSE, $default = "") } krsort($hits); + // Add lower case placeholders to avoid errors + foreach($attrs as $key => $attr) $attrs[strtolower($key)] = $attr; + // Replace the placeholder in the given string now. foreach($hits as $match){ // Avoid errors about undefined index. - $name = $match[2]; + $name = strtolower($match[2]); if(!isset($attrs[$name])) $attrs[$name] = $default; // Calculate the replacement -- 2.30.2