Changeset 135 for branches/2.0singleton/services
- Timestamp:
- Jun 1, 2006 7:42:53 AM (18 years ago)
- Location:
- branches/2.0singleton/services
- Files:
-
- 4 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 } -
branches/2.0singleton/services/logout.php
r129 r135 5 5 */ 6 6 7 if (is _a($auth, 'Auth_SQL')) {7 if (isset($auth) && method_exists($auth, 'getVal')) { 8 8 // Delete the current user's record locks. 9 9 require_once 'codebase/lib/RecordLock.inc.php'; -
branches/2.0singleton/services/logs.php
r132 r135 40 40 // Set the defaults and catch incoming settings. 41 41 $prefs =& Prefs::getInstance(); 42 $prefs-> setDefault('log_file', $app->getParam('log_filename'), 'logs_module');43 $prefs->set Value('log_file', getFormData('log'), 'logs_module');42 $prefs->default('log_file', $app->getParam('log_filename'), 'logs_module'); 43 $prefs->set('log_file', getFormData('log'), 'logs_module'); 44 44 45 45 // Titles and navigation header. 46 $nav->addPage(sprintf(_("Viewing log: <em>%s</em>"), $prefs->get Value('log_file', 'logs_module')), '/admin/logs.php');46 $nav->addPage(sprintf(_("Viewing log: <em>%s</em>"), $prefs->get('log_file', 'logs_module')), '/admin/logs.php'); 47 47 48 48 /****************************************************************************** … … 57 57 case 'delete' : 58 58 // $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET); 59 deleteLog($prefs->get Value('log_file', 'logs_module'));60 $prefs->set Value('log_file', $app->getParam('log_filename'), 'logs_module');59 deleteLog($prefs->get('log_file', 'logs_module')); 60 $prefs->set('log_file', $app->getParam('log_filename'), 'logs_module'); 61 61 if ($app->validBoomerangURL('app_log')) { 62 62 // Display boomerang page. … … 69 69 case 'clear' : 70 70 // $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET); 71 clearLog($prefs->get Value('log_file', 'logs_module'));71 clearLog($prefs->get('log_file', 'logs_module')); 72 72 if ($app->validBoomerangURL('app_log')) { 73 73 // Display boomerang page. … … 80 80 case 'archive' : 81 81 // $auth->requireAccessClearance(ZONE_ADMIN_APPLOG_FUNC_RESET); 82 if (archiveLog($prefs->get Value('log_file', 'logs_module'))) {82 if (archiveLog($prefs->get('log_file', 'logs_module'))) { 83 83 // Now flush current log. 84 84 $app->dieURL($_SERVER['PHP_SELF'] . '?op=clear'); … … 98 98 case 'download' : 99 99 header('Content-Type: application/octet-stream'); 100 header(sprintf('Content-Disposition: attachment; filename=%s.txt', $prefs->get Value('log_file', 'logs_module')));101 printLog($prefs->get Value('log_file', 'logs_module'));100 header(sprintf('Content-Disposition: attachment; filename=%s.txt', $prefs->get('log_file', 'logs_module'))); 101 printLog($prefs->get('log_file', 'logs_module')); 102 102 die; 103 103 break; 104 104 105 105 default : 106 $list =& getLog($prefs->get Value('log_file', 'logs_module'), getFormData('search_query'));106 $list =& getLog($prefs->get('log_file', 'logs_module'), getFormData('search_query')); 107 107 $main_template = 'log_list.ihtml'; 108 108 break; … … 126 126 include 'header.ihtml'; 127 127 if ('output' == $main_template) { 128 printLog($prefs->get Value('log_file', 'logs_module'));128 printLog($prefs->get('log_file', 'logs_module')); 129 129 } else { 130 130 include 'codebase/services/templates/' . $main_template; -
branches/2.0singleton/services/templates/log_list.ihtml
r132 r135 10 10 <tr class="commandtext"> 11 11 <td> 12 <?php if ($l['filename'] == $prefs->get Value('log_file', 'logs_module')) { ?>12 <?php if ($l['filename'] == $prefs->get('log_file', 'logs_module')) { ?> 13 13 <span class="commanditem"><strong><?php echo sprintf(_("%s"), $l['filename']); ?></strong></span> 14 14 <?php } else { ?>
Note: See TracChangeset
for help on using the changeset viewer.