mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
- added method qstr() to inc.DBAccess.php and use it class Session
This commit is contained in:
parent
f2e279f4c5
commit
c3c1694826
|
@ -120,6 +120,17 @@ class LetoDMS_Core_DatabaseAccess {
|
||||||
else return true;
|
else return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sanitize String used in database operations
|
||||||
|
*
|
||||||
|
* @param string text
|
||||||
|
* @return string sanitized string
|
||||||
|
*/
|
||||||
|
function qstr($text) { /* {{{ */
|
||||||
|
return $this->_conn->qstr($text);
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute SQL query and return result
|
* Execute SQL query and return result
|
||||||
*
|
*
|
||||||
|
|
|
@ -66,7 +66,7 @@ class LetoDMS_Session {
|
||||||
* @return boolean true if successful otherwise false
|
* @return boolean true if successful otherwise false
|
||||||
*/
|
*/
|
||||||
function load($id) { /* {{{ */
|
function load($id) { /* {{{ */
|
||||||
$queryStr = "SELECT * FROM tblSessions WHERE id = '".$id."'";
|
$queryStr = "SELECT * FROM tblSessions WHERE id = ".$this->db->qstr($id)."";
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
$resArr = $this->db->getResultArray($queryStr);
|
||||||
if (is_bool($resArr) && $resArr == false)
|
if (is_bool($resArr) && $resArr == false)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user