Fix for db_hits while in install-mode, thanks to AndreasJung again. :)
authorRoland Häder <roland@mxchange.org>
Sat, 4 Oct 2008 13:31:16 +0000 (13:31 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 4 Oct 2008 13:31:16 +0000 (13:31 +0000)
inc/databases.php
inc/db/lib-mysql3.php

index 6f22e86..e94cd1e 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "446");
+define('CURR_SVN_REVISION', "447");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index fe033ae..0f18ac3 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