Introduced detectServerProtocol() to fully support HTTPS and more use of isFullQualif...
[mailer.git] / inc / functions.php
index 4469fb25e0f9f2a27e22a4d5cf7d9f3d4fc96909..a240205c2816c7bfa2355f19448b205e4ff41496 100644 (file)
@@ -2083,7 +2083,7 @@ function encodeUrl ($url, $outputMode = '0') {
        } // END - if
 
        // Add {?URL?} ?
-       if ((substr($url, 0, strlen(getUrl())) != getUrl()) && (substr($url, 0, 7) != '{?URL?}') && (substr($url, 0, 7) != 'http://') && (substr($url, 0, 8) != 'https://')) {
+       if ((substr($url, 0, strlen(getUrl())) != getUrl()) && (substr($url, 0, 7) != '{?URL?}') && (!isFullQualifiedUrl($url))) {
                // Add it
                $url = '{?URL?}/' . $url;
        } // END - if