Fix for db_hits while in install-mode, thanks to AndreasJung again. :)
[mailer.git] / inc / db / lib-mysql3.php
index fe033aeb965e2ea8fe7f902a93c31ff68a3ed5d9..0f18ac383cdfb2ed62b788398bacd2d429ce4946 100644 (file)
@@ -197,11 +197,11 @@ function SQL_CLOSE(&$link, $F, $L) {
                // Skip double close
                return false;
        } // END - if
-
-       // Add new hits
-       $_CONFIG['db_hits'] += $_CONFIG['db_hits_run'];
        //* DEBUG: */ echo "DB=".$_CONFIG['db_hits'].",CACHE=".$_CONFIG['cache_hits']."<br />\n";
        if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($_CONFIG['db_hits'])) && (isset($_CONFIG['cache_hits'])) && (is_object($cacheInstance))) {
+               // Add new hits
+               $_CONFIG['db_hits'] += $_CONFIG['db_hits_run'];
+
                // Update counter for db/cache
                UPDATE_CONFIG(array("db_hits", "cache_hits"), array(bigintval($_CONFIG['db_hits']), bigintval($_CONFIG['cache_hits'])));
        } // END - if