summaryrefslogtreecommitdiffstats
path: root/inc/render.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-04 12:24:49 +0100
committerSimon Rettberg2017-12-04 12:24:49 +0100
commit0bd0e4b1ff36b054ce1d9340942c45beeb0cf959 (patch)
tree68bd8624f53cc8e39da18824cb3acaf1e088663a /inc/render.inc.php
parent[statistics] Add missing filter values to "state" (diff)
downloadslx-admin-0bd0e4b1ff36b054ce1d9340942c45beeb0cf959.tar.gz
slx-admin-0bd0e4b1ff36b054ce1d9340942c45beeb0cf959.tar.xz
slx-admin-0bd0e4b1ff36b054ce1d9340942c45beeb0cf959.zip
[inc/Render] Fix lang_ matching regexp (spaces)
Diffstat (limited to 'inc/render.inc.php')
-rw-r--r--inc/render.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/render.inc.php b/inc/render.inc.php
index 13262c1d..d09b2a8e 100644
--- a/inc/render.inc.php
+++ b/inc/render.inc.php
@@ -224,15 +224,15 @@ class Render
$params = array();
}
// Now find all language tags in this array
- if (preg_match_all('/{{(lang_.+?)}}/', $html, $out) > 0) {
+ if (preg_match_all('/{{\s*(lang_.+?)\s*}}/', $html, $out) > 0) {
$dictionary = Dictionary::getArray($module, 'template-tags');
$fallback = false;
foreach ($out[1] as $tag) {
- // Add untranslated strings to the dictionary, so their tag is seen in the rendered page
if ($fallback === false && empty($dictionary[$tag])) {
- $fallback = true; // Fallback to general dictionary of module
+ $fallback = true; // Fallback to general dictionary of main module
$dictionary = $dictionary + Dictionary::getArray('main', 'global-tags');
}
+ // Add untranslated strings to the dictionary, so their tag is seen in the rendered page
if (empty($dictionary[$tag])) {
$dictionary[$tag] = '{{' . $tag . '}}';
}