Changeset 99
- Timestamp:
- 2007-12-12 16:53:32 (1 year ago)
- Files:
-
- trunk/classes/misc/Authcode.php (modified) (2 diffs)
- trunk/classes/pages/Page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/classes/misc/Authcode.php
r76 r99 43 43 // remove auth code from session since it's no longer needed 44 44 unset($_SESSION['pw']); 45 unset($_SESSION['pw_page']); 45 46 } /* function destroy */ 46 47 … … 59 60 // put into session 60 61 $_SESSION['pw'] = $p->get(); 62 // remember number of page this was written 63 $_SESSION['pw_page'] = $_SESSION['page']; 61 64 } /* function generate */ 62 65 trunk/classes/pages/Page.php
r70 r99 51 51 // get current timestamp (microseconds) for execution time 52 52 $this->exec_time_start = microtime(TRUE); 53 // check if auth code in session is set 54 if (isset($_SESSION['pw']) && $_SESSION['pw'] != '') { 55 // check if it's still valid 56 if ($_SESSION['pages'] > $_SESSION['pw_page'] + 1) { 57 // has been set longer ago than the previous page -> remove 58 $auth = new Authcode(); 59 $auth->destroy(); 60 unset($auth); 61 } 62 } 53 63 /* Have some kind of manual per-page login credentials been posted? 54 64 * This shouldn't be checked on 'Userpanel' page, because there is a special handling of that there. */
