- Timestamp:
- Jun 7, 2006 8:41:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/skel/admin.php
r152 r153 34 34 35 35 // Configure the prefs object. 36 $ prefs =& Prefs::getInstance('%NAME_PLURAL%');37 $ prefs->setParam(array('persistent' => false));36 $tmp_prefs = new Prefs('%NAME_PLURAL%'); 37 $tmp_prefs->setParam(array('persistent' => false)); 38 38 39 39 // Configure the cache object. 40 $cache = & Cache::getInstance('%NAME_PLURAL%');40 $cache = new Cache('%NAME_PLURAL%'); 41 41 $cache->setParam(array('enable' => true)); 42 42 … … 255 255 { 256 256 global $lock; 257 global $cache; 257 258 $db =& DB::getInstance(); 258 $cache =& Cache::getInstance('%NAME_PLURAL%');259 259 260 260 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 290 290 { 291 291 global $auth; 292 global $cache; 292 293 $db =& DB::getInstance(); 293 $cache =& Cache::getInstance('%NAME_PLURAL%');294 294 295 295 // Remove any stale cached list data. … … 311 311 { 312 312 global $auth, $lock; 313 global $cache; 313 314 $app =& App::getInstance(); 314 $cache =& Cache::getInstance('%NAME_PLURAL%');315 315 316 316 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%']); … … 338 338 global $page; 339 339 global $so; 340 global $tmp_prefs; 341 global $cache; 340 342 $db =& DB::getInstance(); 341 $prefs =& Prefs::getInstance('%NAME_PLURAL%');342 $cache =& Cache::getInstance('%NAME_PLURAL%');343 343 344 344 $where_clause = ''; … … 390 390 // without knowing the hash. 391 391 $cache_hash = md5($sql . '|' . $page->total_items); 392 if ($ prefs->get('cache_hash') != $cache_hash) {392 if ($tmp_prefs->get('cache_hash') != $cache_hash) { 393 393 $cache->delete('list'); 394 $ prefs->set('cache_hash', $cache_hash);394 $tmp_prefs->set('cache_hash', $cache_hash); 395 395 } 396 396 … … 416 416 function updateRank($ranks) 417 417 { 418 global $cache; 418 419 $db =& DB::getInstance(); 419 $cache =& Cache::getInstance('%NAME_PLURAL%');420 420 421 421 if (!is_array($ranks)) {
Note: See TracChangeset
for help on using the changeset viewer.