diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-08-08 08:21:45 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-08-08 08:21:45 +0200 |
commit | de56ea1909d515d3e4807a04a6c4644b8226d08d (patch) | |
tree | c8ad7166af152fe14887022e64b8a0de896cdfda /program/include/rcube_contacts.php | |
parent | d55c02ba0334192103344dd54701cec066aa65b5 (diff) | |
parent | c2b20fc0b4c6c1271fff9a85cb977d23de0a3421 (diff) |
Merge branch 'pdo'
Conflicts:
CHANGELOG
Diffstat (limited to 'program/include/rcube_contacts.php')
-rw-r--r-- | program/include/rcube_contacts.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php index f7fc65147..534a65cb9 100644 --- a/program/include/rcube_contacts.php +++ b/program/include/rcube_contacts.php @@ -36,7 +36,7 @@ class rcube_contacts extends rcube_addressbook /** * Store database connection. * - * @var rcube_mdb2 + * @var rcube_db */ private $db = null; private $user_id = 0; @@ -934,8 +934,8 @@ class rcube_contacts extends rcube_addressbook $contact_id ); - if ($this->db->db_error) - $this->set_error(self::ERROR_SAVING, $this->db->db_error_msg); + if ($error = $this->db->is_error()) + $this->set_error(self::ERROR_SAVING, $error); else $added++; } @@ -990,9 +990,10 @@ class rcube_contacts extends rcube_addressbook $checkname); // append number to make name unique - if ($hit = $this->db->num_rows($sql_result)) + if ($hit = $this->db->fetch_array($sql_result)) { $checkname = $name . ' ' . $num++; - } while ($hit > 0); + } + } while ($hit); return $checkname; } |