]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Compilation time added, some compileCode() calles removed, ADMIN_WHAT_404 added
[mailer.git] / inc / functions.php
index b6d40608d3a53662d16bb29357b04d4dc28e2367..c9d530034735a1d88b48db113107bd8082ac0f42 100644 (file)
@@ -996,6 +996,9 @@ function compileCode ($code, $simple = false, $constants = true, $full = true) {
                return $code;
        } // END - if
 
+       // Start couting
+       $startCompile = explode(' ', microtime());
+
        // Init replacement-array with full security characters
        $secChars = $GLOBALS['security_chars'];
 
@@ -1071,6 +1074,12 @@ function compileCode ($code, $simple = false, $constants = true, $full = true) {
                } // END - foreach
        } // END - if
 
+       // Get timing
+       $compiled = explode(' ', microtime());
+
+       // Add timing
+       $code .= '<!-- Compilation time: ' . ((($compiled[1] + $compiled[0]) - ($startCompile[1] + $startCompile[0])) * 1000). 'ms //-->';
+
        // Return compiled code
        return $code;
 }
@@ -1752,9 +1761,6 @@ function sendPostRequest ($script, $postData) {
                return array('', '', '');
        } // END - if
 
-       // Compile the script name
-       $script = compileCode($script);
-
        // Extract host name from script
        $host = extractHostnameFromUrl($script);
 
@@ -1895,9 +1901,6 @@ function sendRawRequest ($host, $request) {
 
 // Taken from www.php.net eregi() user comments
 function isEmailValid ($email) {
-       // Compile email
-       $email = compileCode($email);
-
        // Check first part of email address
        $first = '[-a-z0-9!#$%&\'*+/=?^_<{|}~]+(\.[-a-zA-Z0-9!#$%&\'*+/=?^_<{|}~]+)*';