summaryrefslogtreecommitdiff
path: root/plugins/database_attachments
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-09-23 22:44:13 +0200
committerThomas Bruederli <thomas@roundcube.net>2012-09-23 22:44:13 +0200
commit0c144b98a417d50b9c073ae3931fdad47390f1f7 (patch)
treee1a94ada7e5e06fc7c21de13dbb3f86f88634ec7 /plugins/database_attachments
parent8f098e8dead85b6512ac72b2d805314baec72a2f (diff)
parente695162ef76054050e4181e4d28f28cf1981386b (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'plugins/database_attachments')
-rw-r--r--plugins/database_attachments/database_attachments.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/database_attachments/database_attachments.php b/plugins/database_attachments/database_attachments.php
index 9a279f57e..079f4e567 100644
--- a/plugins/database_attachments/database_attachments.php
+++ b/plugins/database_attachments/database_attachments.php
@@ -46,9 +46,9 @@ class database_attachments extends filesystem_attachments
$data = base64_encode($data);
$status = $rcmail->db->query(
- "INSERT INTO ".get_table_name('cache')."
- (created, user_id, cache_key, data)
- VALUES (".$rcmail->db->now().", ?, ?, ?)",
+ "INSERT INTO ".get_table_name('cache')
+ ." (created, user_id, cache_key, data)"
+ ." VALUES (".$rcmail->db->now().", ?, ?, ?)",
$_SESSION['user_id'],
$key,
$data);
@@ -82,9 +82,9 @@ class database_attachments extends filesystem_attachments
$data = base64_encode($args['data']);
$status = $rcmail->db->query(
- "INSERT INTO ".get_table_name('cache')."
- (created, user_id, cache_key, data)
- VALUES (".$rcmail->db->now().", ?, ?, ?)",
+ "INSERT INTO ".get_table_name('cache')
+ ." (created, user_id, cache_key, data)"
+ ." VALUES (".$rcmail->db->now().", ?, ?, ?)",
$_SESSION['user_id'],
$key,
$data);
@@ -106,9 +106,9 @@ class database_attachments extends filesystem_attachments
$args['status'] = false;
$rcmail = rcmail::get_instance();
$status = $rcmail->db->query(
- "DELETE FROM ".get_table_name('cache')."
- WHERE user_id=?
- AND cache_key=?",
+ "DELETE FROM ".get_table_name('cache')
+ ." WHERE user_id = ?"
+ ." AND cache_key = ?",
$_SESSION['user_id'],
$args['id']);
@@ -138,10 +138,10 @@ class database_attachments extends filesystem_attachments
$rcmail = rcmail::get_instance();
$sql_result = $rcmail->db->query(
- "SELECT cache_id, data
- FROM ".get_table_name('cache')."
- WHERE user_id=?
- AND cache_key=?",
+ "SELECT data"
+ ." FROM ".get_table_name('cache')
+ ." WHERE user_id=?"
+ ." AND cache_key=?",
$_SESSION['user_id'],
$args['id']);
@@ -161,9 +161,9 @@ class database_attachments extends filesystem_attachments
$prefix = $this->cache_prefix . $args['group'];
$rcmail = rcmail::get_instance();
$rcmail->db->query(
- "DELETE FROM ".get_table_name('cache')."
- WHERE user_id=?
- AND cache_key like '{$prefix}%'",
+ "DELETE FROM ".get_table_name('cache')
+ ." WHERE user_id = ?"
+ ." AND cache_key LIKE '{$prefix}%'",
$_SESSION['user_id']);
}
}