alecpl
2010-04-22 821a560f19543424344f3d75ff1eacc8c27e7ce7
- one improvement more


1 files modified
8 ■■■■ changed files
program/include/rcube_contacts.php 8 ●●●● patch | view | raw | blame | history
program/include/rcube_contacts.php
@@ -167,7 +167,8 @@
                " ON (m.contact_id = c.".$this->primary_key.")";
        $sql_result = $this->db->limitquery(
            "SELECT * FROM ".$this->db_name." AS c ".$join .
            "SELECT * FROM ".$this->db_name." AS c" .
            $join .
            " WHERE c.del<>1" .
                " AND c.user_id=?" .
                ($this->group_id ? " AND m.contactgroup_id=?" : "").
@@ -194,6 +195,8 @@
        else if ($this->list_page <= 1) {
            if ($cnt < $this->page_size && $subset == 0)
                $this->result->count = $cnt;
            else if (isset($this->cache['count']))
                $this->result->count = $this->cache['count'];
            else
                $this->result->count = $this->_count();
        }
@@ -269,7 +272,8 @@
        // count contacts for this user
        $sql_result = $this->db->query(
            "SELECT COUNT(c.contact_id) AS rows".
            " FROM ".$this->db_name." AS c ".$join.
            " FROM ".$this->db_name." AS c".
                $join.
            " WHERE  c.del<>1".
            " AND c.user_id=?".
            ($this->group_id ? " AND m.contactgroup_id=?" : "").