Changeset 135 for branches/2.0singleton/services/admins.php
- Timestamp:
- Jun 1, 2006 7:42:53 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0singleton/services/admins.php
r132 r135 11 11 12 12 require_once 'codebase/lib/PageNumbers.inc.php'; 13 require_once 'codebase/lib/ SessionCache.inc.php';13 require_once 'codebase/lib/Cache.inc.php'; 14 14 require_once 'codebase/lib/FormValidator.inc.php'; 15 15 require_once 'codebase/lib/SortOrder.inc.php'; … … 30 30 $fv = new FormValidator(); 31 31 32 $cache =& SessionCache::getInstance();32 $cache =& Cache::getInstance(); 33 33 34 34 // Instantiate a sorting object with the default sort and order. Add SQL for each column. … … 71 71 if (getFormData('break_list_cache', false)) { 72 72 // Break the cache because we are changing the list data. 73 $cache-> breakCache($_SERVER['PHP_SELF']);73 $cache->delete($_SERVER['PHP_SELF']); 74 74 } 75 75 … … 319 319 $app =& App::getInstance(); 320 320 $db =& DB::getInstance(); 321 $cache =& SessionCache::getInstance();321 $cache =& Cache::getInstance(); 322 322 323 323 $lock->select('admin_tbl', 'admin_id', $id); … … 327 327 328 328 // Break the cache because we are changing the list data. 329 $cache-> breakCache($_SERVER['PHP_SELF']);329 $cache->delete($_SERVER['PHP_SELF']); 330 330 331 331 // Get the information for this object. … … 367 367 $app =& App::getInstance(); 368 368 $db =& DB::getInstance(); 369 $cache =& SessionCache::getInstance();369 $cache =& Cache::getInstance(); 370 370 371 371 // Break the cache because we are changing the list data. 372 $cache-> breakCache($_SERVER['PHP_SELF']);372 $cache->delete($_SERVER['PHP_SELF']); 373 373 374 374 // Insert record data. … … 411 411 $app =& App::getInstance(); 412 412 $db =& DB::getInstance(); 413 $cache =& SessionCache::getInstance();413 $cache =& Cache::getInstance(); 414 414 415 415 $lock->select('admin_tbl', 'admin_id', $frm['admin_id']); … … 419 419 420 420 // Break the cache because we are changing the list data. 421 $cache-> breakCache($_SERVER['PHP_SELF']);421 $cache->delete($_SERVER['PHP_SELF']); 422 422 423 423 // If the userpass is left blank or with the filler **** characters, we don't want to update it. … … 456 456 $db =& DB::getInstance(); 457 457 $prefs =& Prefs::getInstance(); 458 $cache =& SessionCache::getInstance();458 $cache =& Cache::getInstance(); 459 459 460 460 $where_clause = ''; … … 507 507 // without knowing the hash. 508 508 $cache_hash = md5($sql . '|' . $page->total_items); 509 if ($prefs->get Value('cache_hash', $_SERVER['PHP_SELF']) != $cache_hash) {510 $cache-> breakCache($_SERVER['PHP_SELF']);511 $prefs->set Value('cache_hash', $cache_hash, $_SERVER['PHP_SELF']);512 } 513 514 if ($cache-> isCached($_SERVER['PHP_SELF']) && false) {509 if ($prefs->get('cache_hash', $_SERVER['PHP_SELF']) != $cache_hash) { 510 $cache->delete($_SERVER['PHP_SELF']); 511 $prefs->set('cache_hash', $cache_hash, $_SERVER['PHP_SELF']); 512 } 513 514 if ($cache->exists($_SERVER['PHP_SELF']) && false) { 515 515 // Get the cached results. 516 $list = $cache->get Cache($_SERVER['PHP_SELF']);516 $list = $cache->get($_SERVER['PHP_SELF']); 517 517 } else { 518 518 // If the list is not already cached, query now. … … 525 525 if (isset($list) && !empty($list)) { 526 526 // Cache the results. 527 $cache-> putCache($list, $_SERVER['PHP_SELF']);527 $cache->set($list, $_SERVER['PHP_SELF']); 528 528 } 529 529 }
Note: See TracChangeset
for help on using the changeset viewer.