Commit 4c3b6817a72fa8f7d70a5a2e0ab7e5a74efbd283

Authored by Neil Blakey-Milner
1 parent abc7338f

Turn cache grinder off for RC and Final.

Give better error messages for cache grinder in ktentity::load.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5379 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 9 additions and 3 deletions
lib/ktentity.inc
... ... @@ -33,7 +33,7 @@ $_STOPCACHING = array();
33 33  
34 34 require_once(KT_LIB_DIR . '/cache/cache.inc.php');
35 35  
36   -DEFINE("EVIL_CACHE_GRIND", true);
  36 +DEFINE("EVIL_CACHE_GRIND", false);
37 37  
38 38 class KTEntity {
39 39 var $_bUsePearError = false;
... ... @@ -218,9 +218,15 @@ class KTEntity {
218 218 $aFailures = array();
219 219 $sEntClass = get_class($this);
220 220  
221   - foreach (array_keys($res) as $sKey => $sVal) {
  221 + foreach ($res as $sKey => $aVal) {
222 222 if ($mCached[$sKey] != $res[$sKey]) {
223   - $aFailures[] = $sKey;
  223 + $id = $aVal['id'];
  224 + foreach ($aVal as $sField => $sStored) {
  225 + if ($mCached[$sKey][$sField] != $sStored) {
  226 + $aFailures[] = sprintf("For %d field %s, stored value is %s, but cached value is %s", $id, $sField, $sStored, $mCached[$sKey][$sField]);
  227 + }
  228 + }
  229 + // $aFailures[] = $sKey;
224 230 }
225 231 }
226 232  
... ...