Changeset 4374 in subversion
- Timestamp:
- Dec 28, 2010 3:31:19 AM (2 years ago)
- Location:
- branches/devel-addressbook/program
- Files:
-
- 7 edited
-
include/main.inc (modified) (1 diff)
-
include/rcube_addressbook.php (modified) (1 diff)
-
include/rcube_contacts.php (modified) (2 diffs)
-
steps/addressbook/delete.inc (modified) (1 diff)
-
steps/addressbook/func.inc (modified) (1 diff)
-
steps/addressbook/list.inc (modified) (1 diff)
-
steps/addressbook/search.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/devel-addressbook/program/include/main.inc
r4242 r4374 798 798 // format each col 799 799 foreach ($a_show_cols as $col) 800 $table->add($col, Q( $row_data[$col]));800 $table->add($col, Q(is_array($row_data[$col]) ? $row_data[$col][0] : $row_data[$col])); 801 801 802 802 $c++; -
branches/devel-addressbook/program/include/rcube_addressbook.php
r4361 r4374 65 65 66 66 /** 67 * Refresh saved search set after data has changed 68 * 69 * @return mixed New search set 70 */ 71 function refresh_search() 72 { 73 return $this->get_search_set(); 74 } 75 76 /** 67 77 * List the current set of contact records 68 78 * -
branches/devel-addressbook/program/include/rcube_contacts.php
r4314 r4374 156 156 * List the current set of contact records 157 157 * 158 * @param array List of cols to show 158 * @param array List of cols to show, Null means all 159 159 * @param int Only return this number of records, use negative values for tail 160 160 * @param boolean True to skip the count query (select only) … … 191 191 $this->group_id); 192 192 193 // determine whether we have to parse the vcard or if only db cols are requested 194 $read_vcard = !$cols || count(array_intersect($cols, array_keys($sql_arr))) < count($cols); 195 193 196 while ($sql_result && ($sql_arr = $this->db->fetch_assoc($sql_result))) { 194 197 $sql_arr['ID'] = $sql_arr[$this->primary_key]; 195 $sql_arr['email'] = preg_split('/,\s*/', $sql_arr['email']); 198 199 if ($read_vcard) 200 $sql_arr = $this->convert_db_data($sql_arr); 201 else 202 $sql_arr['email'] = preg_split('/,\s*/', $sql_arr['email']); 203 196 204 // make sure we have a name to display 197 205 if (empty($sql_arr['name'])) 198 206 $sql_arr['name'] = $sql_arr['email'][0]; 207 199 208 $this->result->add($sql_arr); 200 209 } -
branches/devel-addressbook/program/steps/addressbook/delete.inc
r4172 r4374 39 39 $result = $CONTACTS->count(); 40 40 41 // update saved search after data changed 42 if (($search_request = $_REQUEST['_search']) && isset($_SESSION['search'][$search_request])) 43 $_SESSION['search'][$search_request] = $CONTACTS->refresh_search(); 44 41 45 // update message count display 42 46 $OUTPUT->set_env('pagecount', ceil($result->count / $CONTACTS->page_size)); -
branches/devel-addressbook/program/steps/addressbook/func.inc
r4358 r4374 175 175 global $CONTACTS, $OUTPUT; 176 176 177 // define list of cols to be displayed 178 $a_show_cols = array('name'); 179 177 180 // count contacts for this user 178 $result = $CONTACTS->list_records( );181 $result = $CONTACTS->list_records($a_show_cols); 179 182 180 183 // add id to message list table if not specified 181 184 if (!strlen($attrib['id'])) 182 185 $attrib['id'] = 'rcmAddressList'; 183 184 // define list of cols to be displayed185 $a_show_cols = array('name');186 186 187 187 // create XHTML table -
branches/devel-addressbook/program/steps/addressbook/list.inc
r3989 r4374 21 21 22 22 // get contacts for this user 23 $result = $CONTACTS->list_records( );23 $result = $CONTACTS->list_records(array('name')); 24 24 25 25 // update message count display -
branches/devel-addressbook/program/steps/addressbook/search.inc
r4150 r4374 6 6 | | 7 7 | This file is part of the Roundcube Webmail client | 8 | Copyright (C) 2005-20 07, Roundcube Dev. - Switzerland |8 | Copyright (C) 2005-2010, Roundcube Dev. - Switzerland | 9 9 | Licensed under the GNU GPL | 10 10 | | … … 29 29 $result = $CONTACTS->search(array('name','email'), $search); 30 30 31 // save search settings in session 32 $_SESSION['search'][$search_request] = $CONTACTS->get_search_set(); 33 31 34 if ($result->count > 0) 32 35 { 33 // save search settings in session34 $_SESSION['search'][$search_request] = $CONTACTS->get_search_set();35 36 36 // create javascript list 37 37 rcmail_js_contacts_list($result);
Note: See TracChangeset
for help on using the changeset viewer.
