Changeset 132 for branches/2.0singleton/bin/module_maker
- Timestamp:
- May 30, 2006 10:05:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0singleton/bin/module_maker/skel/admin.php
r130 r132 32 32 // The object to validate form input. 33 33 $fv = new FormValidator(); 34 35 $cache =& SessionCache::getInstance(); 34 36 35 37 %SORT_ORDER% … … 56 58 if (getFormData('break_list_cache', false)) { 57 59 // Break the cache because we are changing the list data. 58 SessionCache::breakCache($_SERVER['PHP_SELF']);60 $cache->breakCache($_SERVER['PHP_SELF']); 59 61 } 60 62 … … 248 250 global $lock; 249 251 $db =& DB::getInstance(); 252 $cache =& SessionCache::getInstance(); 250 253 251 254 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 255 258 256 259 // Break the cache because we are changing the list data. 257 SessionCache::breakCache($_SERVER['PHP_SELF']);260 $cache->breakCache($_SERVER['PHP_SELF']); 258 261 259 262 // Get the information for this object. … … 282 285 global $auth; 283 286 $db =& DB::getInstance(); 287 $cache =& SessionCache::getInstance(); 284 288 285 289 // Break the cache because we are changing the list data. 286 SessionCache::breakCache($_SERVER['PHP_SELF']);290 $cache->breakCache($_SERVER['PHP_SELF']); 287 291 288 292 %INSERT% … … 300 304 function updateRecord($frm) 301 305 { 302 global $auth, $lock; 303 306 global $auth, $lock; 307 $app =& App::getInstance(); 308 $cache =& SessionCache::getInstance(); 309 304 310 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%']); 305 311 if ($lock->isLocked() && !$lock->isMine()) { … … 308 314 309 315 // Break the cache because we are changing the list data. 310 SessionCache::breakCache($_SERVER['PHP_SELF']);316 $cache->breakCache($_SERVER['PHP_SELF']); 311 317 312 318 %UPDATE% … … 327 333 global $so; 328 334 $db =& DB::getInstance(); 335 $prefs =& Prefs::getInstance(); 336 $cache =& SessionCache::getInstance(); 329 337 330 338 $where_clause = ''; … … 375 383 // without knowing the hash. 376 384 $cache_hash = md5($sql . '|' . $page->total_items); 377 if ( Prefs::getValue('cache_hash', $_SERVER['PHP_SELF']) != $cache_hash) {378 SessionCache::breakCache($_SERVER['PHP_SELF']);379 Prefs::setValue('cache_hash', $cache_hash, $_SERVER['PHP_SELF']);380 } 381 382 if ( SessionCache::isCached($_SERVER['PHP_SELF'])) {385 if ($prefs->getValue('cache_hash', $_SERVER['PHP_SELF']) != $cache_hash) { 386 $cache->breakCache($_SERVER['PHP_SELF']); 387 $prefs->setValue('cache_hash', $cache_hash, $_SERVER['PHP_SELF']); 388 } 389 390 if ($cache->isCached($_SERVER['PHP_SELF'])) { 383 391 // Get the cached results. 384 $list = SessionCache::getCache($_SERVER['PHP_SELF']);392 $list = $cache->getCache($_SERVER['PHP_SELF']); 385 393 } else { 386 394 // If the list is not already cached, query now. … … 393 401 if (isset($list) && !empty($list)) { 394 402 // Cache the results. 395 SessionCache::putCache($list, $_SERVER['PHP_SELF']);403 $cache->putCache($list, $_SERVER['PHP_SELF']); 396 404 } 397 405 } … … 403 411 { 404 412 $db =& DB::getInstance(); 413 $cache =& SessionCache::getInstance(); 405 414 406 415 if (!is_array($ranks)) { … … 410 419 411 420 // Break the cache because we are changing the list data. 412 SessionCache::breakCache($_SERVER['PHP_SELF']);421 $cache->breakCache($_SERVER['PHP_SELF']); 413 422 414 423 // Count the ranks with invalid numbers
Note: See TracChangeset
for help on using the changeset viewer.