summaryrefslogtreecommitdiff
path: root/includes/db/DatabaseSqlite.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/db/DatabaseSqlite.php')
-rw-r--r--includes/db/DatabaseSqlite.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php
index 5299c688..112c417b 100644
--- a/includes/db/DatabaseSqlite.php
+++ b/includes/db/DatabaseSqlite.php
@@ -289,15 +289,22 @@ class DatabaseSqlite extends Database {
}
function encodeBlob($b) {
- return $this->strencode($b);
+ return new Blob( $b );
}
function decodeBlob($b) {
+ if ($b instanceof Blob) {
+ $b = $b->fetch();
+ }
return $b;
}
function addQuotes($s) {
- return $this->mConn->quote($s);
+ if ( $s instanceof Blob ) {
+ return "x'" . bin2hex( $s->fetch() ) . "'";
+ } else {
+ return $this->mConn->quote($s);
+ }
}
function quote_ident($s) { return $s; }