From a004bb8cbe4a8f0adf68b5b63de1ef1d32007255 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 29 Apr 2010 07:15:02 -0400
Subject: [PATCH] - code re-formatting + small improvements

---
 program/include/rcube_contacts.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php
index 81fef6d..c756ada 100644
--- a/program/include/rcube_contacts.php
+++ b/program/include/rcube_contacts.php
@@ -226,7 +226,7 @@
         foreach ($fields as $col) {
             if ($col == 'ID' || $col == $this->primary_key) {
                 $ids         = !is_array($value) ? explode(',', $value) : $value;
-                $ids         = join(',', array_map(array($this->db, 'quote'), $ids));
+                $ids         = $this->db->array2list($ids, 'integer');
                 $add_where[] = 'c.' . $this->primary_key.' IN ('.$ids.')';
             }
             else if ($strict)
@@ -437,7 +437,7 @@
         if (!is_array($ids))
             $ids = explode(',', $ids);
 
-        $ids = join(',', array_map(array($this->db, 'quote'), $ids));
+        $ids = $this->db->array2list($ids, 'integer');
 
         // flag record as deleted
         $this->db->query(
@@ -589,8 +589,8 @@
         if (!is_array($ids))
             $ids = explode(',', $ids);
 
-        $ids = join(',', array_map(array($this->db, 'quote'), $ids));
-    
+        $ids = $this->db->array2list($ids, 'integer');
+
         $sql_result = $this->db->query(
             "DELETE FROM ".get_table_name('contactgroupmembers').
             " WHERE contactgroup_id=?".

--
Gitblit v1.9.1