diff options
| author | David M <davidmj@users.sourceforge.net> | 2006-08-06 05:52:41 +0000 |
|---|---|---|
| committer | David M <davidmj@users.sourceforge.net> | 2006-08-06 05:52:41 +0000 |
| commit | 2f901a520326b4d6941ef18fcfce0a9d5ef9cea5 (patch) | |
| tree | 7ef08c7f0bedfed5f6a65278c8dc53194ac16d20 /phpBB/includes/db/sqlite.php | |
| parent | b4b901b82552e639cae00c4dc38542cf6fe2d873 (diff) | |
| download | forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.tar forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.tar.gz forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.tar.bz2 forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.tar.xz forums-2f901a520326b4d6941ef18fcfce0a9d5ef9cea5.zip | |
This should end some issues we have been having regarding the proper binary encoding of stuff. :D
Acyd Burn: quit breaking the schema :P
git-svn-id: file:///svn/phpbb/trunk@6238 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/sqlite.php')
| -rw-r--r-- | phpBB/includes/db/sqlite.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php index 8bea1a3198..c203af9f67 100644 --- a/phpBB/includes/db/sqlite.php +++ b/phpBB/includes/db/sqlite.php @@ -216,7 +216,16 @@ class dbal_sqlite extends dbal return $cache->sql_fetchrow($query_id); } - return ($query_id) ? @sqlite_fetch_array($query_id, SQLITE_ASSOC) : false; + $row = @sqlite_fetch_array($query_id, SQLITE_ASSOC); + if ($row) + { + foreach ($row as $key => $value) + { + $row[$key] = (strpos($key, 'bitfield') === false) ? $value : sqlite_udf_decode_binary($value); + } + } + + return $row; } /** @@ -308,6 +317,14 @@ class dbal_sqlite extends dbal } /** + * Escape string used in sql query + */ + function sql_escape_binary($msg) + { + return "'" . @sqlite_udf_encode_binary($msg) . "'"; + } + + /** * return sql error array * @access: private */ |
