Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Added @results support for sqlP macros

givanzf5df45cb3c5c
diff --git a/system/sqlp/lexer.php b/system/sqlp/lexer.php
index 7bc2a5d..1fafba6 100755
--- a/system/sqlp/lexer.php
+++ b/system/sqlp/lexer.php
@@ -210,6 +210,16 @@ class Lexer {
},
$macro);
+ //@result
+ //replace result variables
+ $macro =
+ preg_replace_callback(
+ '/@result\.([\w\.]+)/',
+ function ($matches) {
+ return \Vvveb\dotToArrayKey('$results.' . $matches[1]);
+ },
+ $macro);
+
//replace macro template placeholders %placeholder
$macro = preg_replace_callback(
'@\%(\w+)@',