Changeset 480 for trunk/docs
- Timestamp:
- May 4, 2014 12:29:05 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/examples/_config.inc.php
r468 r480 123 123 // Load preferences for the user. 124 124 require_once 'codebase/lib/Prefs.inc.php'; 125 $prefs = new Prefs('permanent'); 126 $prefs->setParam(array( 127 'persistent' => $auth->isLoggedIn(), 125 $prefs = new Prefs('permanent', array( 126 'storagetype' => ($auth->isLoggedIn() ? 'database' : 'session'), 128 127 'user_id' => $auth->get('user_id'), 129 128 )); 130 129 $prefs->setDefaults(array( 130 // ... 131 131 )); 132 132 $prefs->load(); 133 // Load preferences for temporary usage. 134 require_once 'codebase/lib/Prefs.inc.php'; 135 $c_prefs = new Prefs('config'); 136 $c_prefs->setParam(array( 137 'storagetype' => 'cookie', 138 )); 133 139 // Temporary prefs. 134 $ tmp_prefs = new Prefs('temporary');135 $ tmp_prefs->setDefaults(array(140 $c_prefs = new Prefs('settings'); 141 $c_prefs->setDefaults(array( 136 142 )); 137 143
Note: See TracChangeset
for help on using the changeset viewer.