From: Roland Häder Date: Sat, 24 Jul 2010 02:58:18 +0000 (+0000) Subject: Rewritten to make usage of newly introduced math EL code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d3871e8ae2b4971563132abce52a7771756600e2;p=mailer.git Rewritten to make usage of newly introduced math EL code --- diff --git a/.gitattributes b/.gitattributes index f7c06ae41c..abe684db01 100644 --- a/.gitattributes +++ b/.gitattributes @@ -336,6 +336,7 @@ inc/mails/_mails.php -text svneol=unset#text/plain inc/mails/beg_mails.php -text svneol=unset#text/plain inc/mails/bonus_mails.php -text svneol=unset#text/plain inc/mails/doubler_mails.php -text svneol=unset#text/plain +inc/math-functions.php svneol=native#text/plain inc/module-functions.php svneol=native#text/plain inc/modules/.htaccess -text svneol=unset#text/plain inc/modules/admin.php -text svneol=unset#text/plain diff --git a/DOCS/prop-set.sh b/DOCS/prop-set.sh index 1df2b4ca7d..d78be89316 100755 --- a/DOCS/prop-set.sh +++ b/DOCS/prop-set.sh @@ -13,3 +13,5 @@ find -type f -name "*.png" -exec svn propset svn:mime-type "image/png" {} \; find -type f -name "*.gif" -exec svn propset svn:mime-type "image/gif" {} \; find -type f -name "*.txt" -exec svn propset svn:mime-type "text/plain" {} \; find -type f -name "*.tpl" -exec svn propset svn:mime-type "text/plain" {} \; + +find inc/phpmailer/ -type f -name "*.php" -exec svn propdel svn:keywords {} \; diff --git a/inc/expression-functions.php b/inc/expression-functions.php index 6d393659b1..47da9de138 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -285,5 +285,21 @@ function doExpressionTemplate ($data) { return $code; } +// Expression call-back for math functions +function doExpressionMath ($data) { + // Do the replacement + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']); + $replacer = '{DQUOTE} . doCalculate' . $data['callback'] . '(' . $data['value'] . ') . {DQUOTE}'; + + // Replace the code + $code = replaceExpressionCode($data, $replacer); + + // Load include once + loadIncludeOnce('inc/math-functions.php'); + + // Return the (maybe) replaced code + return $code; +} + // [EOF] ?> diff --git a/inc/math-functions.php b/inc/math-functions.php new file mode 100644 index 0000000000..13d5a36e47 --- /dev/null +++ b/inc/math-functions.php @@ -0,0 +1,58 @@ + diff --git a/templates/de/html/admin/admin_add_sponsor.tpl b/templates/de/html/admin/admin_add_sponsor.tpl index 4728050631..61bc5cdbe6 100644 --- a/templates/de/html/admin/admin_add_sponsor.tpl +++ b/templates/de/html/admin/admin_add_sponsor.tpl @@ -175,12 +175,12 @@ diff --git a/templates/de/html/guest/guest_sponsor_reg.tpl b/templates/de/html/guest/guest_sponsor_reg.tpl index e783c4e9ac..67dc40c248 100644 --- a/templates/de/html/guest/guest_sponsor_reg.tpl +++ b/templates/de/html/guest/guest_sponsor_reg.tpl @@ -200,12 +200,12 @@ diff --git a/templates/de/html/sponsor/sponsor_settings_form.tpl b/templates/de/html/sponsor/sponsor_settings_form.tpl index b3ac13cf05..32d0a9949e 100644 --- a/templates/de/html/sponsor/sponsor_settings_form.tpl +++ b/templates/de/html/sponsor/sponsor_settings_form.tpl @@ -21,13 +21,13 @@ @@ -35,7 +35,7 @@ {--SPONSOR_ENTER_PASSWORD--}: - +