From da2e00e96b8f0272cb4a36dd339f2547b07f0552 Mon Sep 17 00:00:00 2001 From: steinm Date: Wed, 29 Aug 2012 20:42:33 +0000 Subject: [PATCH] - new method getId() --- inc/inc.ClassSession.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/inc/inc.ClassSession.php b/inc/inc.ClassSession.php index 3dd403a2c..ab14001bf 100644 --- a/inc/inc.ClassSession.php +++ b/inc/inc.ClassSession.php @@ -57,6 +57,7 @@ class LetoDMS_Session { */ function __construct($db) { /* {{{ */ $this->db = $db; + $this->id = false; } /* }}} */ /** @@ -75,6 +76,7 @@ class LetoDMS_Session { $queryStr = "UPDATE tblSessions SET lastAccess = " . mktime() . " WHERE id = " . $this->db->qstr($id); if (!$this->db->getResult($queryStr)) return false; + $this->id = $id; return $resArr[0]; } /* }}} */ @@ -123,7 +125,17 @@ class LetoDMS_Session { if (!$this->db->getResult($queryStr)) { return false; } + $this->id = false; return true; } /* }}} */ + + /** + * Get session id + * + * @return string session id + */ + function getId() { /* {{{ */ + return $this->id; + } /* }}} */ } ?>