From 77f3c7c57a0fb8b0a975e2986098b68ca87c4acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Tue, 16 Sep 2014 11:50:39 +0200 Subject: [PATCH] Update PicoDb --- models/schema.php | 1 + vendor/PicoDb/Database.php | 6 ++++++ vendor/PicoDb/Table.php | 8 ++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/models/schema.php b/models/schema.php index 255a294..b394b8a 100644 --- a/models/schema.php +++ b/models/schema.php @@ -7,6 +7,7 @@ function version_27($pdo) $pdo->exec('ALTER TABLE config ADD COLUMN items_display_mode TEXT DEFAULT "summaries"'); } + function version_26($pdo) { $pdo->exec('ALTER TABLE config ADD COLUMN bookmarklet_token TEXT DEFAULT "'.\Model\Config\generate_token().'"'); diff --git a/vendor/PicoDb/Database.php b/vendor/PicoDb/Database.php index 4d7b703..5d0beb8 100644 --- a/vendor/PicoDb/Database.php +++ b/vendor/PicoDb/Database.php @@ -78,6 +78,12 @@ class Database } + public function closeConnection() + { + $this->pdo = null; + } + + public function escapeIdentifier($value) { return $this->pdo->escapeIdentifier($value); diff --git a/vendor/PicoDb/Table.php b/vendor/PicoDb/Table.php index b333feb..cc63743 100644 --- a/vendor/PicoDb/Table.php +++ b/vendor/PicoDb/Table.php @@ -44,7 +44,11 @@ class Table } } - + /** + * Update + * + * Note: Do not use `rowCount()` the behaviour is different across drivers + */ public function update(array $data) { $columns = array(); @@ -70,7 +74,7 @@ class Table $result = $this->db->execute($sql, $values); - return $result !== false && $result->rowCount() > 0; + return $result !== false; }