From 706a7042cc84216bae19a23416a5b4f41567228f Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Wed, 3 Jul 2019 16:35:44 -0600 Subject: [PATCH] Change dictionary even if current_dictionary is selected --- src/php/api/Dictionary.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php/api/Dictionary.php b/src/php/api/Dictionary.php index a6b923f..d48cc37 100644 --- a/src/php/api/Dictionary.php +++ b/src/php/api/Dictionary.php @@ -59,7 +59,7 @@ VALUES ($new_id, ?, ?, ?, ?)"; public function changeCurrent ($user, $dictionary) { $update_query = 'UPDATE users SET current_dictionary=? WHERE id=?'; $update = $this->db->query($update_query, array($dictionary, $user)); - if ($update->rowCount() > 0) { + if (trim($this->db->last_error_info[2]) == '') { return $dictionary; } return false;