Naming convention applied, ext-network menu resorted:
[mailer.git] / inc / functions.php
index df6bbe1ab084c0080609ccfa4fbeb74606a468ab..bccca8bca0c4d10721abab9fc45fae73727d7bdd 100644 (file)
@@ -2176,15 +2176,6 @@ function mapModuleToTable ($moduleName) {
 
 // Add SQL debug data to array for later output
 function addSqlToDebug ($result, $sqlString, $timing, $F, $L) {
-       // Already executed?
-       if (isset($GLOBALS['debug_sqls'][$F][$L][$sqlString])) {
-               // Then abort here, we don't need to profile a query twice
-               return;
-       } // END - if
-
-       // Remeber this as profiled (or not, but we don't care here)
-       $GLOBALS['debug_sqls'][$F][$L][$sqlString] = true;
-
        // Do we have cache?
        if (!isset($GLOBALS['debug_sql_available'])) {
                // Check it and cache it in $GLOBALS
@@ -2196,6 +2187,15 @@ function addSqlToDebug ($result, $sqlString, $timing, $F, $L) {
                return;
        } // END - if
 
+       // Already executed?
+       if (isset($GLOBALS['debug_sqls'][$F][$L][$sqlString])) {
+               // Then abort here, we don't need to profile a query twice
+               return;
+       } // END - if
+
+       // Remeber this as profiled (or not, but we don't care here)
+       $GLOBALS['debug_sqls'][$F][$L][$sqlString] = true;
+
        // Generate record
        $record = array(
                'num_rows' => SQL_NUMROWS($result),