]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Now extension code must be inserted like {%ext,version=foo%}
[mailer.git] / inc / filters.php
index 4e9356c2c89a978a48de96f6c1ccc4d812077074..89af47dbfd6a1edc52f03a0a3af8c7c047ee8f83 100644 (file)
@@ -478,12 +478,19 @@ function FILTER_COMPILE_EXTENSION ($code) {
 
                                // And continue with next entry
                                continue;
-                       } else {
+                       } elseif (substr($cmd, 0 , 3) == 'ext') {
+                               // Get the extension command
+                               $extCmd = explode(',', $cmd);
+                               $extCmd = $extCmd[1];
+
                                // Construct call-back function name
-                               $functionName = 'getExtension' . ucfirst(strtolower($cmd));
+                               $functionName = 'getExtension' . ucfirst(strtolower($extCmd));
 
                                // Construct call of the function
                                $replacer = "\" . call_user_func_array('" . $functionName . "', array('" . $matches[3][$key] . "', true)) . \"";
+                       } else {
+                               // Unknown command detected
+                               debug_report_bug('Unknown command ' . $cmd . ' detected.');
                        }
 
                        // Replace it and insert parameter for GET request