summaryrefslogtreecommitdiff
path: root/program/include/rcube_contacts.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-06-19 10:46:41 +0200
committerAleksander Machniak <alec@alec.pl>2012-06-19 10:46:41 +0200
commit0d94fd45f422fe0d0460f5db7a7761f56bc18236 (patch)
treef31258055eb7f91a6fc29ce8e5639921f968afce /program/include/rcube_contacts.php
parent207d618c22f6e50cf1dff983791282afe9f267ce (diff)
New database layer based on PHP PDO
Diffstat (limited to 'program/include/rcube_contacts.php')
-rw-r--r--program/include/rcube_contacts.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php
index f7fc65147..6984b49cc 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;
@@ -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;
}