Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -289,15 +289,22 @@ |
290 | 290 | } |
291 | 291 | |
292 | 292 | function encodeBlob($b) { |
293 | | - return $this->strencode($b); |
| 293 | + return new Blob( $b ); |
294 | 294 | } |
295 | 295 | |
296 | 296 | function decodeBlob($b) { |
| 297 | + if ($b instanceof Blob) { |
| 298 | + $b = $b->fetch(); |
| 299 | + } |
297 | 300 | return $b; |
298 | 301 | } |
299 | 302 | |
300 | 303 | function addQuotes($s) { |
301 | | - return $this->mConn->quote($s); |
| 304 | + if ( $s instanceof Blob ) { |
| 305 | + return "x'" . bin2hex( $s->fetch() ) . "'"; |
| 306 | + } else { |
| 307 | + return $this->mConn->quote($s); |
| 308 | + } |
302 | 309 | } |
303 | 310 | |
304 | 311 | function quote_ident($s) { return $s; } |