]> git.mxchange.org Git - mailer.git/blobdiff - inc/template-functions.php
This 'return FALSE' caused that the PHP's error handler was called :( So, do NEVER...
[mailer.git] / inc / template-functions.php
index f296be7355dc7e9918f091c3a15b610d05eb574a..208c2f21267780c53be2bf487f72bd1284fe0847 100644 (file)
@@ -187,11 +187,8 @@ function compileFinalOutput () {
        // Do the final (general) compilation
        $GLOBALS['__output'] = doFinalCompilation($GLOBALS['__output']);
 
-       // Is the output mode not HTML?
-       if (!isHtmlOutputMode()) {
-               // Then remove entities
-               $GLOBALS['__output'] = compileUriCode($GLOBALS['__output']);
-       } // END - if
+       // Compile any other things out
+       $GLOBALS['__output'] = compileUriCode($GLOBALS['__output']);
 
        // Extension 'rewrite' installed?
        if ((isExtensionActive('rewrite')) && (!isCssOutputMode())) {
@@ -1381,7 +1378,7 @@ function compileUriCode ($code, $simple = TRUE) {
        } // END - if
 
        // Compile QUOT and other non-HTML codes
-       $code = str_replace($charsCompile['from'], $charsCompile['to'], decodeEntities($code));
+       $code = str_replace($charsCompile['from'], $charsCompile['to'], $code);
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'code=' . $code);
 
        // Return compiled code
@@ -2242,6 +2239,18 @@ function doTemplatePointsPaymentMethodSelectionBox ($templateName, $clear = FALS
        return $content;
 }
 
+// Template helper function to create a deferrer code if URL is not empty
+function doTemplateDereferrerUrl ($templateName, $clear = FALSE, $url = NULL) {
+       // Is the URL not NULL and not empty?
+       if ((!is_null($url)) && (!empty($url))) {
+               // Set HTML with EL code
+               $url = '<a href="{%pipe,generateDereferrerUrl=' . $url . '%}" rel="external" target="_blank">{--ADMIN_TEST_URL--}</a>';
+       } // END - if
+
+       // Return URL (or content) or dashes if empty
+       return fixEmptyContentToDashes($url);
+}
+
 // Tries to anonymize some sensitive data (e.g. IP address, user agent, referrer, etc.)
 function anonymizeSensitiveData ($data) {
        // Trim it