From d979fd0c393880233143e10b8ac6a6899f9db4c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 20 Nov 2009 17:21:05 +0000 Subject: [PATCH] Now extension code must be inserted like {%ext,version=foo%} --- inc/filters.php | 11 +++++++++-- templates/de/html/login_failed_js.tpl | 2 +- templates/de/html/member/member_order_send.tpl | 2 +- .../de/html/member/member_surfbar_book_dynamic.tpl | 2 +- .../de/html/member/member_surfbar_book_static.tpl | 2 +- .../html/member/member_surfbar_edit_action_form.tpl | 2 +- templates/de/html/page_header.tpl | 2 +- templates/de/html/surfbar/surfbar_stopped.tpl | 2 +- templates/de/html/uberwach/uberwach_snippet.tpl | 2 +- 9 files changed, 17 insertions(+), 10 deletions(-) diff --git a/inc/filters.php b/inc/filters.php index 4e9356c2c8..89af47dbfd 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -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 diff --git a/templates/de/html/login_failed_js.tpl b/templates/de/html/login_failed_js.tpl index ecc75f507e..53908c0f02 100644 --- a/templates/de/html/login_failed_js.tpl +++ b/templates/de/html/login_failed_js.tpl @@ -1 +1 @@ - + diff --git a/templates/de/html/member/member_order_send.tpl b/templates/de/html/member/member_order_send.tpl index 7c7b5b3a0d..fae55abed3 100644 --- a/templates/de/html/member/member_order_send.tpl +++ b/templates/de/html/member/member_order_send.tpl @@ -1,5 +1,5 @@
{--MEMBER_ORDER_PLEASE_WAIT_1--}10{--MEMBER_ORDER_PLEASE_WAIT_2--}
- +
diff --git a/templates/de/html/member/member_surfbar_book_dynamic.tpl b/templates/de/html/member/member_surfbar_book_dynamic.tpl index 9b78058aaa..c51dbde392 100644 --- a/templates/de/html/member/member_surfbar_book_dynamic.tpl +++ b/templates/de/html/member/member_surfbar_book_dynamic.tpl @@ -34,7 +34,7 @@ - + diff --git a/templates/de/html/member/member_surfbar_book_static.tpl b/templates/de/html/member/member_surfbar_book_static.tpl index 51e131db9d..70445dd72f 100644 --- a/templates/de/html/member/member_surfbar_book_static.tpl +++ b/templates/de/html/member/member_surfbar_book_static.tpl @@ -34,6 +34,6 @@ - + diff --git a/templates/de/html/member/member_surfbar_edit_action_form.tpl b/templates/de/html/member/member_surfbar_edit_action_form.tpl index 288df314f0..f0708cbedb 100644 --- a/templates/de/html/member/member_surfbar_edit_action_form.tpl +++ b/templates/de/html/member/member_surfbar_edit_action_form.tpl @@ -27,6 +27,6 @@ - diff --git a/templates/de/html/page_header.tpl b/templates/de/html/page_header.tpl index c40672b248..dfd6add475 100644 --- a/templates/de/html/page_header.tpl +++ b/templates/de/html/page_header.tpl @@ -7,4 +7,4 @@ - + diff --git a/templates/de/html/surfbar/surfbar_stopped.tpl b/templates/de/html/surfbar/surfbar_stopped.tpl index 5b01934238..d904d81540 100644 --- a/templates/de/html/surfbar/surfbar_stopped.tpl +++ b/templates/de/html/surfbar/surfbar_stopped.tpl @@ -11,5 +11,5 @@ - diff --git a/templates/de/html/uberwach/uberwach_snippet.tpl b/templates/de/html/uberwach/uberwach_snippet.tpl index e990b396e2..4050da7b58 100644 --- a/templates/de/html/uberwach/uberwach_snippet.tpl +++ b/templates/de/html/uberwach/uberwach_snippet.tpl @@ -3,6 +3,6 @@ - + -- 2.39.5