projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e45e218
)
Proper cache hit counting fixed
author
Roland Häder
<roland@mxchange.org>
Thu, 1 Apr 2010 18:40:15 +0000
(18:40 +0000)
committer
Roland Häder
<roland@mxchange.org>
Thu, 1 Apr 2010 18:40:15 +0000
(18:40 +0000)
inc/wrapper-functions.php
patch
|
blob
|
history
diff --git
a/inc/wrapper-functions.php
b/inc/wrapper-functions.php
index 2127a208e7e62d1e6b70ade8346aa97d1f12fdd9..48db9bbc05b706263abad490660594bfce5b9fb4 100644
(file)
--- a/
inc/wrapper-functions.php
+++ b/
inc/wrapper-functions.php
@@
-716,7
+716,10
@@
function isExtensionInstalledAndNewer ($ext_name, $version) {
// Is an cache entry found?
if (!isset($GLOBALS['ext_installed_newer'][$ext_name][$version])) {
$GLOBALS['ext_installed_newer'][$ext_name][$version] = ((isExtensionInstalled($ext_name)) && (getExtensionVersion($ext_name) >= $version));
// Is an cache entry found?
if (!isset($GLOBALS['ext_installed_newer'][$ext_name][$version])) {
$GLOBALS['ext_installed_newer'][$ext_name][$version] = ((isExtensionInstalled($ext_name)) && (getExtensionVersion($ext_name) >= $version));
- } // END - if
+ } else {
+ // Cache hits should be incremented twice
+ incrementStatsEntry('cache_hits', 2);
+ }
// Return it
//* DEBUG: */ print __FUNCTION__.':'.$ext_name.'=>'.$version.':'.intval($GLOBALS['ext_installed_newer'][$ext_name][$version]).'<br />';
// Return it
//* DEBUG: */ print __FUNCTION__.':'.$ext_name.'=>'.$version.':'.intval($GLOBALS['ext_installed_newer'][$ext_name][$version]).'<br />';
@@
-728,7
+731,10
@@
function isExtensionInstalledAndOlder ($ext_name, $version) {
// Is an cache entry found?
if (!isset($GLOBALS['ext_installed_older'][$ext_name][$version])) {
$GLOBALS['ext_installed_older'][$ext_name][$version] = ((isExtensionInstalled($ext_name)) && (isExtensionOlder($ext_name, $version)));
// Is an cache entry found?
if (!isset($GLOBALS['ext_installed_older'][$ext_name][$version])) {
$GLOBALS['ext_installed_older'][$ext_name][$version] = ((isExtensionInstalled($ext_name)) && (isExtensionOlder($ext_name, $version)));
- } // END - if
+ } else {
+ // Cache hits should be incremented twice
+ incrementStatsEntry('cache_hits', 2);
+ }
// Return it
//* DEBUG: */ print __FUNCTION__.':'.$ext_name.'<'.$version.':'.intval($GLOBALS['ext_installed_older'][$ext_name][$version]).'<br />';
// Return it
//* DEBUG: */ print __FUNCTION__.':'.$ext_name.'<'.$version.':'.intval($GLOBALS['ext_installed_older'][$ext_name][$version]).'<br />';