From: hickert Date: Fri, 14 Jan 2011 15:55:34 +0000 (+0000) Subject: Updated placeholder handling in templates, case is ignored now. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d077b1abf78c1919e7f949c50b155d35d321e82a;p=gosa.git 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 --- 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