mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 21:51:32 +00:00
- new method getId()
This commit is contained in:
parent
322d4e78d9
commit
da2e00e96b
|
@ -57,6 +57,7 @@ class LetoDMS_Session {
|
||||||
*/
|
*/
|
||||||
function __construct($db) { /* {{{ */
|
function __construct($db) { /* {{{ */
|
||||||
$this->db = $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);
|
$queryStr = "UPDATE tblSessions SET lastAccess = " . mktime() . " WHERE id = " . $this->db->qstr($id);
|
||||||
if (!$this->db->getResult($queryStr))
|
if (!$this->db->getResult($queryStr))
|
||||||
return false;
|
return false;
|
||||||
|
$this->id = $id;
|
||||||
return $resArr[0];
|
return $resArr[0];
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -123,7 +125,17 @@ class LetoDMS_Session {
|
||||||
if (!$this->db->getResult($queryStr)) {
|
if (!$this->db->getResult($queryStr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$this->id = false;
|
||||||
return true;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get session id
|
||||||
|
*
|
||||||
|
* @return string session id
|
||||||
|
*/
|
||||||
|
function getId() { /* {{{ */
|
||||||
|
return $this->id;
|
||||||
|
} /* }}} */
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user