From d908aaeb0c04154bc11437f8b3dad9e1f0822a1c Mon Sep 17 00:00:00 2001 From: Intersel Date: Thu, 25 Apr 2019 22:37:51 +0200 Subject: [PATCH] remove [[++settings]] variables from match as it creates bad entries ('+aVariable') for the TVs array when the templates contains settings variables... ->change of the preg_match_all rule in findTemplateVars function --- core/components/wayfinder/wayfinder.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/components/wayfinder/wayfinder.class.php b/core/components/wayfinder/wayfinder.class.php index de6c94f..5a838cd 100644 --- a/core/components/wayfinder/wayfinder.class.php +++ b/core/components/wayfinder/wayfinder.class.php @@ -808,7 +808,9 @@ public function get_file_contents($filename) { } public function findTemplateVars($tpl) { - preg_match_all('~\[\[\+(.*?)\]\]~', $tpl, $matches); + # Intersel - 20190425 -remove [[++settings]] variables from match + #preg_match_all('~\[\[\+(.*?)\]\]~', $tpl, $matches); + preg_match_all('~\[\[\+([^\+].*?)\]\]~', $tpl, $matches); $TVs = array(); foreach($matches[1] as $tv) { if (strpos($tv, "wf.") === false) {