[Pkg-owncloud-commits] [owncloud] 06/153: Quote column names on insert
David Prévot
taffit at moszumanska.debian.org
Tue May 27 03:05:23 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 1b7eb4dc6cfce382c7a3192bdc8bf6fd52791de1
Author: Bart Visscher <bartv at thisnet.nl>
Date: Sat Jan 11 12:22:23 2014 +0100
Quote column names on insert
---
core/command/db/convertfromsqlite.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/core/command/db/convertfromsqlite.php b/core/command/db/convertfromsqlite.php
index ed0443e..5ae54b6 100644
--- a/core/command/db/convertfromsqlite.php
+++ b/core/command/db/convertfromsqlite.php
@@ -194,7 +194,11 @@ class ConvertFromSqlite extends Command {
$progress->setRedrawFrequency($count > 100 ? 5 : 1);
while($row = $statement->fetch()) {
$progress->advance();
- $toDB->insert($table, $row);
+ $data = array();
+ foreach ($row as $columnName => $value) {
+ $data[$toDB->quoteIdentifier($columnName)] = $value;
+ }
+ $toDB->insert($table, $data);
}
$progress->finish();
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list