summaryrefslogtreecommitdiff
path: root/program/include/session.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-09 20:07:10 +0000
committeralecpl <alec@alec.pl>2009-05-09 20:07:10 +0000
commit26d857447f5a9d2e8a9c44fd5707a18523926e1d (patch)
tree94fee71badd2967ca74ebf8c17ec27c2bb31563c /program/include/session.inc
parentae1df26948104dcc0a97bd83b189a36c69f37977 (diff)
- Fix session handling on non-session SQL query error (#1485734)
Diffstat (limited to 'program/include/session.inc')
-rw-r--r--program/include/session.inc16
1 files changed, 0 insertions, 16 deletions
diff --git a/program/include/session.inc b/program/include/session.inc
index 983d01587..d75b303b3 100644
--- a/program/include/session.inc
+++ b/program/include/session.inc
@@ -39,10 +39,6 @@ function rcube_sess_read($key)
$DB = rcmail::get_instance()->get_dbh();
- if ($DB->is_error()) {
- return false;
- }
-
$sql_result = $DB->query(
"SELECT vars, ip, " . $DB->unixtimestamp('changed') . " AS changed
FROM " . get_table_name('session') . "
@@ -66,10 +62,6 @@ function rcube_sess_write($key, $vars)
{
$DB = rcmail::get_instance()->get_dbh();
- if ($DB->is_error()) {
- return false;
- }
-
$sql_result = $DB->query(
"SELECT 1 FROM " . get_table_name('session') . "
WHERE sess_id=?",
@@ -105,10 +97,6 @@ function rcube_sess_destroy($key)
$rcmail = rcmail::get_instance();
$DB = $rcmail->get_dbh();
- if ($DB->is_error()) {
- return false;
- }
-
$DB->query("DELETE FROM " . get_table_name('session') . " WHERE sess_id=?", $key);
return true;
@@ -121,10 +109,6 @@ function rcube_sess_gc($maxlifetime)
$rcmail = rcmail::get_instance();
$DB = $rcmail->get_dbh();
- if ($DB->is_error()) {
- return false;
- }
-
// just delete all expired sessions
$DB->query("DELETE FROM " . get_table_name('session') . "
WHERE changed < " . $DB->fromunixtime(time() - $maxlifetime));