]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Commented out for Opera fix, thanks to profi-concept. More headers added for buggy...
[mailer.git] / inc / functions.php
index df47862705423e1d7f52da718881317d3ff6e095..c32fbdc0fa0c27ebaa66483fa9847efee4bd3a23 100644 (file)
@@ -142,6 +142,19 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) {
                // Clear output buffer for later output
                ob_end_clean();
 
+               // Send HTTP header
+               header("HTTP/1.1 200");
+
+               // Used later
+               $now = gmdate('D, d M Y H:i:s') . ' GMT';
+
+               // General headers for no caching
+               header("Expired: " . $now); // RFC2616 - Section 14.21
+               header("Last-Modified: " . $now);
+               header("Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0"); // HTTP/1.1
+               header("Pragma: no-cache"); // HTTP/1.0
+               header("Connection: Close");
+
                // Extension "rewrite" installed?
                if ((EXT_IS_ACTIVE("rewrite")) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) {
                        $OUTPUT = REWRITE_LINKS($OUTPUT);
@@ -1981,8 +1994,8 @@ function generateHash ($plainText, $salt = "") {
 
        // Is the required extension "sql_patches" there and a salt is not given?
        if (((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (!EXT_IS_ACTIVE("sql_patches"))) && (empty($salt))) {
-               // Extension sql_patches is missing/outdated so we return the plain text
-               return $plainText;
+               // Extension sql_patches is missing/outdated so we hash the plain text with MD5
+               return md5($plainText);
        } // END - if
 
        // Do we miss an arry element here?