X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fexpression-functions.php;h=c8129ddb21dc2072b52edb1ff0b8cff43c2481f0;hb=449003a0cf1cf2434ef63e4b7d39685ba3804786;hp=3d713acd449b006fc836781d176d82dd5f4e07da;hpb=4a2cb5340af77e9d7c87c0cf24879dd4e41a9a3e;p=mailer.git diff --git a/inc/expression-functions.php b/inc/expression-functions.php index 3d713acd44..c8129ddb21 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -168,7 +168,7 @@ function doExpressionConfig ($data) { // Do we have a special expression function for it? if (isExpressionFunctionAvaiable($data)) { // Then use it - $replacer = '{DQUOTE} . ' . $data['callback'] . '('.getExpressionFunction($data).'(' . "'" . $data['matches'][4][$data['key']] . "'" . ')) . {DQUOTE}'; + $replacer = '{DQUOTE} . ' . $data['callback'] . '(' . getExpressionFunction($data) . '()) . {DQUOTE}'; } else { // Default replacer is the config value itself $replacer = '{DQUOTE} . ' . $data['callback'] . '(getConfig(' . "'" . $data['matches'][4][$data['key']] . "'" . ')) . {DQUOTE}'; @@ -301,5 +301,29 @@ function doExpressionMath ($data) { return $code; } +// Expression call-back for GET request +function doExpressionGet ($data) { + // Construct the replacer + $replacer = '{%pipe,getRequestParameter=' . $data['value'] . '%}'; + + // Replace the code + $code = replaceExpressionCode($data, $replacer); + + // Return the (maybe) replaced code + return $code; +} + +// Expression call-back for POST request +function doExpressionPost ($data) { + // Construct the replacer + $replacer = '{%pipe,postRequestParameter=' . $data['value'] . '%}'; + + // Replace the code + $code = replaceExpressionCode($data, $replacer); + + // Return the (maybe) replaced code + return $code; +} + // [EOF] ?>