| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | /* |
|---|
| 4 | +-----------------------------------------------------------------------+ |
|---|
| 5 | | program/steps/addressbook/func.inc | |
|---|
| 6 | | | |
|---|
| 7 | | This file is part of the Roundcube Webmail client | |
|---|
| 8 | | Copyright (C) 2005-2007, The Roundcube Dev Team | |
|---|
| 9 | | Licensed under the GNU GPL | |
|---|
| 10 | | | |
|---|
| 11 | | PURPOSE: | |
|---|
| 12 | | Provide addressbook functionality and GUI objects | |
|---|
| 13 | | | |
|---|
| 14 | +-----------------------------------------------------------------------+ |
|---|
| 15 | | Author: Thomas Bruederli <roundcube@gmail.com> | |
|---|
| 16 | +-----------------------------------------------------------------------+ |
|---|
| 17 | |
|---|
| 18 | $Id$ |
|---|
| 19 | |
|---|
| 20 | */ |
|---|
| 21 | |
|---|
| 22 | $SEARCH_MODS_DEFAULT = array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1); |
|---|
| 23 | |
|---|
| 24 | // general definition of contact coltypes |
|---|
| 25 | $CONTACT_COLTYPES = array( |
|---|
| 26 | 'name' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('name'), 'category' => 'main'), |
|---|
| 27 | 'firstname' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('firstname'), 'category' => 'main'), |
|---|
| 28 | 'surname' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('surname'), 'category' => 'main'), |
|---|
| 29 | 'email' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('email'), 'subtypes' => array('home','work','other'), 'category' => 'main'), |
|---|
| 30 | 'middlename' => array('type' => 'text', 'size' => 19, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('middlename'), 'category' => 'main'), |
|---|
| 31 | 'prefix' => array('type' => 'text', 'size' => 8, 'maxlength' => 20, 'limit' => 1, 'label' => rcube_label('nameprefix'), 'category' => 'main'), |
|---|
| 32 | 'suffix' => array('type' => 'text', 'size' => 8, 'maxlength' => 20, 'limit' => 1, 'label' => rcube_label('namesuffix'), 'category' => 'main'), |
|---|
| 33 | 'nickname' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('nickname'), 'category' => 'main'), |
|---|
| 34 | 'jobtitle' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('jobtitle'), 'category' => 'main'), |
|---|
| 35 | 'organization' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('organization'), 'category' => 'main'), |
|---|
| 36 | 'department' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('department'), 'category' => 'main'), |
|---|
| 37 | 'gender' => array('type' => 'select', 'limit' => 1, 'label' => rcube_label('gender'), 'options' => array('male' => rcube_label('male'), 'female' => rcube_label('female')), 'category' => 'personal'), |
|---|
| 38 | 'maidenname' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('maidenname'), 'category' => 'personal'), |
|---|
| 39 | 'phone' => array('type' => 'text', 'size' => 40, 'maxlength' => 20, 'label' => rcube_label('phone'), 'subtypes' => array('home','home2','work','work2','mobile','main','homefax','workfax','car','pager','video','assistant','other'), 'category' => 'main'), |
|---|
| 40 | 'address' => array('type' => 'composite', 'label' => rcube_label('address'), 'subtypes' => array('home','work','other'), 'childs' => array( |
|---|
| 41 | 'street' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('street'), 'category' => 'main'), |
|---|
| 42 | 'locality' => array('type' => 'text', 'size' => 28, 'maxlength' => 50, 'label' => rcube_label('locality'), 'category' => 'main'), |
|---|
| 43 | 'zipcode' => array('type' => 'text', 'size' => 8, 'maxlength' => 15, 'label' => rcube_label('zipcode'), 'category' => 'main'), |
|---|
| 44 | 'region' => array('type' => 'text', 'size' => 12, 'maxlength' => 50, 'label' => rcube_label('region'), 'category' => 'main'), |
|---|
| 45 | 'country' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('country'), 'category' => 'main'), |
|---|
| 46 | ), 'category' => 'main'), |
|---|
| 47 | 'birthday' => array('type' => 'date', 'size' => 12, 'maxlength' => 16, 'label' => rcube_label('birthday'), 'limit' => 1, 'render_func' => 'rcmail_format_date_col', 'category' => 'personal'), |
|---|
| 48 | 'anniversary' => array('type' => 'date', 'size' => 12, 'maxlength' => 16, 'label' => rcube_label('anniversary'), 'limit' => 1, 'render_func' => 'rcmail_format_date_col', 'category' => 'personal'), |
|---|
| 49 | 'website' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('website'), 'subtypes' => array('homepage','work','blog','profile','other'), 'category' => 'main'), |
|---|
| 50 | 'im' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'label' => rcube_label('instantmessenger'), 'subtypes' => array('aim','icq','msn','yahoo','jabber','skype','other'), 'category' => 'main'), |
|---|
| 51 | 'notes' => array('type' => 'textarea', 'size' => 40, 'rows' => 15, 'maxlength' => 500, 'label' => rcube_label('notes'), 'limit' => 1), |
|---|
| 52 | 'photo' => array('type' => 'image', 'limit' => 1, 'category' => 'main'), |
|---|
| 53 | 'assistant' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('assistant'), 'category' => 'personal'), |
|---|
| 54 | 'manager' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('manager'), 'category' => 'personal'), |
|---|
| 55 | 'spouse' => array('type' => 'text', 'size' => 40, 'maxlength' => 50, 'limit' => 1, 'label' => rcube_label('spouse'), 'category' => 'personal'), |
|---|
| 56 | // TODO: define fields for vcards like GEO, KEY |
|---|
| 57 | ); |
|---|
| 58 | |
|---|
| 59 | $PAGE_SIZE = $RCMAIL->config->get('addressbook_pagesize'); |
|---|
| 60 | if (!$PAGE_SIZE) { |
|---|
| 61 | $PAGE_SIZE = $RCMAIL->config->get('pagesize', 50); |
|---|
| 62 | } |
|---|
| 63 | |
|---|
| 64 | // Addressbook UI |
|---|
| 65 | if (!$RCMAIL->action && !$OUTPUT->ajax_call) { |
|---|
| 66 | // add list of address sources to client env |
|---|
| 67 | $js_list = $RCMAIL->get_address_sources(); |
|---|
| 68 | |
|---|
| 69 | $source = get_input_value('_source', RCUBE_INPUT_GPC); |
|---|
| 70 | |
|---|
| 71 | // use first directory by default |
|---|
| 72 | if (!strlen($source) || !isset($js_list[$source])) |
|---|
| 73 | $source = $js_list[key($js_list)]['id']; |
|---|
| 74 | |
|---|
| 75 | // count all/writeable sources |
|---|
| 76 | $writeable = 0; |
|---|
| 77 | $count = 0; |
|---|
| 78 | foreach ($js_list as $sid => $s) { |
|---|
| 79 | $count++; |
|---|
| 80 | if (!$s['readonly']) { |
|---|
| 81 | $writeable++; |
|---|
| 82 | } |
|---|
| 83 | // unset hidden sources |
|---|
| 84 | if ($s['hidden']) { |
|---|
| 85 | unset($js_list[$sid]); |
|---|
| 86 | } |
|---|
| 87 | } |
|---|
| 88 | |
|---|
| 89 | $search_mods = $RCMAIL->config->get('addressbook_search_mods', $SEARCH_MODS_DEFAULT); |
|---|
| 90 | $OUTPUT->set_env('search_mods', $search_mods); |
|---|
| 91 | $OUTPUT->set_env('address_sources', $js_list); |
|---|
| 92 | $OUTPUT->set_env('writable_source', $writeable); |
|---|
| 93 | |
|---|
| 94 | $OUTPUT->set_pagetitle(rcube_label('addressbook')); |
|---|
| 95 | $_SESSION['addressbooks_count'] = $count; |
|---|
| 96 | $_SESSION['addressbooks_count_writeable'] = $writeable; |
|---|
| 97 | |
|---|
| 98 | if (!strlen($source)) |
|---|
| 99 | $source = strval(key($js_list)); |
|---|
| 100 | |
|---|
| 101 | $CONTACTS = rcmail_contact_source($source, true); |
|---|
| 102 | } |
|---|
| 103 | |
|---|
| 104 | // remove undo information... |
|---|
| 105 | if ($undo = $_SESSION['contact_undo']) { |
|---|
| 106 | // ...after timeout |
|---|
| 107 | $undo_time = $RCMAIL->config->get('undo_timeout', 0); |
|---|
| 108 | if ($undo['ts'] < time() - $undo_time) |
|---|
| 109 | $RCMAIL->session->remove('contact_undo'); |
|---|
| 110 | } |
|---|
| 111 | |
|---|
| 112 | // instantiate a contacts object according to the given source |
|---|
| 113 | function rcmail_contact_source($source=null, $init_env=false, $writable=false) |
|---|
| 114 | { |
|---|
| 115 | global $RCMAIL, $OUTPUT, $CONTACT_COLTYPES, $PAGE_SIZE; |
|---|
| 116 | |
|---|
| 117 | if (!strlen($source)) { |
|---|
| 118 | $source = get_input_value('_source', RCUBE_INPUT_GPC); |
|---|
| 119 | } |
|---|
| 120 | |
|---|
| 121 | // Get object |
|---|
| 122 | $CONTACTS = $RCMAIL->get_address_book($source, $writable); |
|---|
| 123 | $CONTACTS->set_pagesize($PAGE_SIZE); |
|---|
| 124 | |
|---|
| 125 | // set list properties and session vars |
|---|
| 126 | if (!empty($_GET['_page'])) |
|---|
| 127 | $CONTACTS->set_page(($_SESSION['page'] = intval($_GET['_page']))); |
|---|
| 128 | else |
|---|
| 129 | $CONTACTS->set_page(isset($_SESSION['page']) ? $_SESSION['page'] : 1); |
|---|
| 130 | |
|---|
| 131 | if (!empty($_REQUEST['_gid'])) |
|---|
| 132 | $CONTACTS->set_group(get_input_value('_gid', RCUBE_INPUT_GPC)); |
|---|
| 133 | |
|---|
| 134 | if (!$init_env) |
|---|
| 135 | return $CONTACTS; |
|---|
| 136 | |
|---|
| 137 | $OUTPUT->set_env('readonly', $CONTACTS->readonly); |
|---|
| 138 | $OUTPUT->set_env('source', $source); |
|---|
| 139 | |
|---|
| 140 | // reduce/extend $CONTACT_COLTYPES with specification from the current $CONTACT object |
|---|
| 141 | if (is_array($CONTACTS->coltypes)) { |
|---|
| 142 | // remove cols not listed by the backend class |
|---|
| 143 | $contact_cols = $CONTACTS->coltypes[0] ? array_flip($CONTACTS->coltypes) : $CONTACTS->coltypes; |
|---|
| 144 | $CONTACT_COLTYPES = array_intersect_key($CONTACT_COLTYPES, $contact_cols); |
|---|
| 145 | // add associative coltypes definition |
|---|
| 146 | if (!$CONTACTS->coltypes[0]) { |
|---|
| 147 | foreach ($CONTACTS->coltypes as $col => $colprop) { |
|---|
| 148 | if (is_array($colprop['childs'])) { |
|---|
| 149 | foreach ($colprop['childs'] as $childcol => $childprop) |
|---|
| 150 | $colprop['childs'][$childcol] = array_merge((array)$CONTACT_COLTYPES[$col]['childs'][$childcol], $childprop); |
|---|
| 151 | } |
|---|
| 152 | $CONTACT_COLTYPES[$col] = $CONTACT_COLTYPES[$col] ? array_merge($CONTACT_COLTYPES[$col], $colprop) : $colprop; |
|---|
| 153 | } |
|---|
| 154 | } |
|---|
| 155 | } |
|---|
| 156 | |
|---|
| 157 | $OUTPUT->set_env('photocol', is_array($CONTACT_COLTYPES['photo'])); |
|---|
| 158 | |
|---|
| 159 | return $CONTACTS; |
|---|
| 160 | } |
|---|
| 161 | |
|---|
| 162 | |
|---|
| 163 | function rcmail_default_source($writable=false) |
|---|
| 164 | { |
|---|
| 165 | global $RCMAIL; |
|---|
| 166 | |
|---|
| 167 | // get list of address sources |
|---|
| 168 | $first = reset($RCMAIL->get_address_sources($writable)); |
|---|
| 169 | |
|---|
| 170 | // use first directory by default |
|---|
| 171 | return $first['id']; |
|---|
| 172 | } |
|---|
| 173 | |
|---|
| 174 | function rcmail_set_sourcename($abook) |
|---|
| 175 | { |
|---|
| 176 | global $OUTPUT; |
|---|
| 177 | |
|---|
| 178 | // get address book name (for display) |
|---|
| 179 | if ($abook && $_SESSION['addressbooks_count'] > 1) { |
|---|
| 180 | $name = $abook->get_name(); |
|---|
| 181 | if (!$name && $source == 0) { |
|---|
| 182 | $name = rcube_label('personaladrbook'); |
|---|
| 183 | } |
|---|
| 184 | $OUTPUT->set_env('sourcename', $name); |
|---|
| 185 | } |
|---|
| 186 | } |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | function rcmail_directory_list($attrib) |
|---|
| 190 | { |
|---|
| 191 | global $RCMAIL, $OUTPUT; |
|---|
| 192 | |
|---|
| 193 | if (!$attrib['id']) |
|---|
| 194 | $attrib['id'] = 'rcmdirectorylist'; |
|---|
| 195 | |
|---|
| 196 | $out = ''; |
|---|
| 197 | $local_id = '0'; |
|---|
| 198 | $jsdata = array(); |
|---|
| 199 | |
|---|
| 200 | $line_templ = html::tag('li', array( |
|---|
| 201 | 'id' => 'rcmli%s', 'class' => '%s'), |
|---|
| 202 | html::a(array('href' => '%s', |
|---|
| 203 | 'rel' => '%s', |
|---|
| 204 | 'onclick' => "return ".JS_OBJECT_NAME.".command('list','%s',this)"), '%s')); |
|---|
| 205 | |
|---|
| 206 | $sources = (array) $OUTPUT->env['address_sources']; |
|---|
| 207 | reset($sources); |
|---|
| 208 | |
|---|
| 209 | // currently selected source |
|---|
| 210 | $current = get_input_value('_source', RCUBE_INPUT_GPC); |
|---|
| 211 | |
|---|
| 212 | foreach ($sources as $j => $source) { |
|---|
| 213 | $id = strval(strlen($source['id']) ? $source['id'] : $j); |
|---|
| 214 | $js_id = JQ($id); |
|---|
| 215 | |
|---|
| 216 | // set class name(s) |
|---|
| 217 | $class_name = 'addressbook'; |
|---|
| 218 | if ($current === $id) |
|---|
| 219 | $class_name .= ' selected'; |
|---|
| 220 | if ($source['readonly']) |
|---|
| 221 | $class_name .= ' readonly'; |
|---|
| 222 | if ($source['class_name']) |
|---|
| 223 | $class_name .= ' ' . $source['class_name']; |
|---|
| 224 | |
|---|
| 225 | $out .= sprintf($line_templ, |
|---|
| 226 | html_identifier($id), |
|---|
| 227 | $class_name, |
|---|
| 228 | Q(rcmail_url(null, array('_source' => $id))), |
|---|
| 229 | $source['id'], |
|---|
| 230 | $js_id, (!empty($source['name']) ? Q($source['name']) : Q($id))); |
|---|
| 231 | |
|---|
| 232 | $groupdata = array('out' => $out, 'jsdata' => $jsdata, 'source' => $id); |
|---|
| 233 | if ($source['groups']) |
|---|
| 234 | $groupdata = rcmail_contact_groups($groupdata); |
|---|
| 235 | $jsdata = $groupdata['jsdata']; |
|---|
| 236 | $out = $groupdata['out']; |
|---|
| 237 | } |
|---|
| 238 | |
|---|
| 239 | $line_templ = html::tag('li', array( |
|---|
| 240 | 'id' => 'rcmliS%s', 'class' => '%s'), |
|---|
| 241 | html::a(array('href' => '#', 'rel' => 'S%s', |
|---|
| 242 | 'onclick' => "return ".JS_OBJECT_NAME.".command('listsearch', '%s', this)"), '%s')); |
|---|
| 243 | |
|---|
| 244 | // Saved searches |
|---|
| 245 | $sources = $RCMAIL->user->list_searches(rcube_user::SEARCH_ADDRESSBOOK); |
|---|
| 246 | foreach ($sources as $j => $source) { |
|---|
| 247 | $id = $source['id']; |
|---|
| 248 | $js_id = JQ($id); |
|---|
| 249 | |
|---|
| 250 | // set class name(s) |
|---|
| 251 | $class_name = 'contactsearch'; |
|---|
| 252 | if ($current === $id) |
|---|
| 253 | $class_name .= ' selected'; |
|---|
| 254 | if ($source['class_name']) |
|---|
| 255 | $class_name .= ' ' . $source['class_name']; |
|---|
| 256 | |
|---|
| 257 | $out .= sprintf($line_templ, |
|---|
| 258 | html_identifier($id), |
|---|
| 259 | $class_name, |
|---|
| 260 | $id, |
|---|
| 261 | $js_id, (!empty($source['name']) ? Q($source['name']) : Q($id))); |
|---|
| 262 | } |
|---|
| 263 | |
|---|
| 264 | $OUTPUT->set_env('contactgroups', $jsdata); |
|---|
| 265 | $OUTPUT->add_gui_object('folderlist', $attrib['id']); |
|---|
| 266 | // add some labels to client |
|---|
| 267 | $OUTPUT->add_label('deletegroupconfirm', 'groupdeleting', 'addingmember', 'removingmember'); |
|---|
| 268 | |
|---|
| 269 | return html::tag('ul', $attrib, $out, html::$common_attrib); |
|---|
| 270 | } |
|---|
| 271 | |
|---|
| 272 | |
|---|
| 273 | function rcmail_contact_groups($args) |
|---|
| 274 | { |
|---|
| 275 | global $RCMAIL; |
|---|
| 276 | |
|---|
| 277 | $groups = $RCMAIL->get_address_book($args['source'])->list_groups(); |
|---|
| 278 | |
|---|
| 279 | if (!empty($groups)) { |
|---|
| 280 | $line_templ = html::tag('li', array( |
|---|
| 281 | 'id' => 'rcmliG%s', 'class' => 'contactgroup'), |
|---|
| 282 | html::a(array('href' => '#', |
|---|
| 283 | 'rel' => '%s:%s', |
|---|
| 284 | 'onclick' => "return ".JS_OBJECT_NAME.".command('listgroup',{'source':'%s','id':'%s'},this)"), '%s')); |
|---|
| 285 | |
|---|
| 286 | $jsdata = array(); |
|---|
| 287 | foreach ($groups as $group) { |
|---|
| 288 | $args['out'] .= sprintf($line_templ, |
|---|
| 289 | html_identifier($args['source'] . $group['ID']), |
|---|
| 290 | $args['source'], $group['ID'], |
|---|
| 291 | $args['source'], $group['ID'], Q($group['name']) |
|---|
| 292 | ); |
|---|
| 293 | $args['jsdata']['G'.$args['source'].$group['ID']] = array( |
|---|
| 294 | 'source' => $args['source'], 'id' => $group['ID'], |
|---|
| 295 | 'name' => $group['name'], 'type' => 'group'); |
|---|
| 296 | } |
|---|
| 297 | } |
|---|
| 298 | |
|---|
| 299 | return $args; |
|---|
| 300 | } |
|---|
| 301 | |
|---|
| 302 | |
|---|
| 303 | // return the contacts list as HTML table |
|---|
| 304 | function rcmail_contacts_list($attrib) |
|---|
| 305 | { |
|---|
| 306 | global $CONTACTS, $OUTPUT; |
|---|
| 307 | |
|---|
| 308 | // define list of cols to be displayed |
|---|
| 309 | $a_show_cols = array('name'); |
|---|
| 310 | |
|---|
| 311 | // add id to message list table if not specified |
|---|
| 312 | if (!strlen($attrib['id'])) |
|---|
| 313 | $attrib['id'] = 'rcmAddressList'; |
|---|
| 314 | |
|---|
| 315 | // create XHTML table |
|---|
| 316 | $out = rcube_table_output($attrib, array(), $a_show_cols, $CONTACTS->primary_key); |
|---|
| 317 | |
|---|
| 318 | // set client env |
|---|
| 319 | $OUTPUT->add_gui_object('contactslist', $attrib['id']); |
|---|
| 320 | $OUTPUT->set_env('current_page', (int)$CONTACTS->list_page); |
|---|
| 321 | $OUTPUT->include_script('list.js'); |
|---|
| 322 | |
|---|
| 323 | // add some labels to client |
|---|
| 324 | $OUTPUT->add_label('deletecontactconfirm', 'copyingcontact', 'contactdeleting'); |
|---|
| 325 | |
|---|
| 326 | return $out; |
|---|
| 327 | } |
|---|
| 328 | |
|---|
| 329 | |
|---|
| 330 | function rcmail_js_contacts_list($result, $prefix='') |
|---|
| 331 | { |
|---|
| 332 | global $OUTPUT; |
|---|
| 333 | |
|---|
| 334 | if (empty($result) || $result->count == 0) |
|---|
| 335 | return; |
|---|
| 336 | |
|---|
| 337 | // define list of cols to be displayed |
|---|
| 338 | $a_show_cols = array('name'); |
|---|
| 339 | |
|---|
| 340 | while ($row = $result->next()) { |
|---|
| 341 | $a_row_cols = array(); |
|---|
| 342 | |
|---|
| 343 | // build contact ID with source ID |
|---|
| 344 | if (isset($row['sourceid'])) { |
|---|
| 345 | $row['ID'] = $row['ID'].'-'.$row['sourceid']; |
|---|
| 346 | } |
|---|
| 347 | |
|---|
| 348 | // format each col |
|---|
| 349 | foreach ($a_show_cols as $col) { |
|---|
| 350 | $val = $row[$col]; |
|---|
| 351 | if ($val == '' && $col == 'name') { |
|---|
| 352 | $val = rcube_addressbook::compose_display_name($row, true); |
|---|
| 353 | } |
|---|
| 354 | |
|---|
| 355 | $a_row_cols[$col] = Q($val); |
|---|
| 356 | } |
|---|
| 357 | |
|---|
| 358 | $OUTPUT->command($prefix.'add_contact_row', $row['ID'], $a_row_cols); |
|---|
| 359 | } |
|---|
| 360 | } |
|---|
| 361 | |
|---|
| 362 | |
|---|
| 363 | // similar function as /steps/settings/identities.inc::rcmail_identity_frame() |
|---|
| 364 | function rcmail_contact_frame($attrib) |
|---|
| 365 | { |
|---|
| 366 | global $OUTPUT; |
|---|
| 367 | |
|---|
| 368 | if (!$attrib['id']) |
|---|
| 369 | $attrib['id'] = 'rcmcontactframe'; |
|---|
| 370 | |
|---|
| 371 | $attrib['name'] = $attrib['id']; |
|---|
| 372 | |
|---|
| 373 | $OUTPUT->set_env('contentframe', $attrib['name']); |
|---|
| 374 | $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif'); |
|---|
| 375 | |
|---|
| 376 | return html::iframe($attrib); |
|---|
| 377 | } |
|---|
| 378 | |
|---|
| 379 | |
|---|
| 380 | function rcmail_rowcount_display($attrib) |
|---|
| 381 | { |
|---|
| 382 | global $OUTPUT; |
|---|
| 383 | |
|---|
| 384 | if (!$attrib['id']) |
|---|
| 385 | $attrib['id'] = 'rcmcountdisplay'; |
|---|
| 386 | |
|---|
| 387 | $OUTPUT->add_gui_object('countdisplay', $attrib['id']); |
|---|
| 388 | |
|---|
| 389 | if ($attrib['label']) |
|---|
| 390 | $_SESSION['contactcountdisplay'] = $attrib['label']; |
|---|
| 391 | |
|---|
| 392 | return html::span($attrib, rcube_label('loading')); |
|---|
| 393 | } |
|---|
| 394 | |
|---|
| 395 | |
|---|
| 396 | function rcmail_get_rowcount_text($result=null) |
|---|
| 397 | { |
|---|
| 398 | global $CONTACTS, $PAGE_SIZE; |
|---|
| 399 | |
|---|
| 400 | // read nr of contacts |
|---|
| 401 | if (!$result) { |
|---|
| 402 | $result = $CONTACTS->get_result(); |
|---|
| 403 | } |
|---|
| 404 | |
|---|
| 405 | if ($result->count == 0) |
|---|
| 406 | $out = rcube_label('nocontactsfound'); |
|---|
| 407 | else |
|---|
| 408 | $out = rcube_label(array( |
|---|
| 409 | 'name' => $_SESSION['contactcountdisplay'] ? $_SESSION['contactcountdisplay'] : 'contactsfromto', |
|---|
| 410 | 'vars' => array( |
|---|
| 411 | 'from' => $result->first + 1, |
|---|
| 412 | 'to' => min($result->count, $result->first + $PAGE_SIZE), |
|---|
| 413 | 'count' => $result->count) |
|---|
| 414 | )); |
|---|
| 415 | |
|---|
| 416 | return $out; |
|---|
| 417 | } |
|---|
| 418 | |
|---|
| 419 | |
|---|
| 420 | function rcmail_get_type_label($type) |
|---|
| 421 | { |
|---|
| 422 | $label = 'type'.$type; |
|---|
| 423 | if (rcube_label_exists($label, '*', $domain)) |
|---|
| 424 | return rcube_label($label, $domain); |
|---|
| 425 | else if (preg_match('/\w+(\d+)$/', $label, $m) |
|---|
| 426 | && ($label = preg_replace('/(\d+)$/', '', $label)) |
|---|
| 427 | && rcube_label_exists($label, '*', $domain)) |
|---|
| 428 | return rcube_label($label, $domain) . ' ' . $m[1]; |
|---|
| 429 | |
|---|
| 430 | return ucfirst($type); |
|---|
| 431 | } |
|---|
| 432 | |
|---|
| 433 | |
|---|
| 434 | function rcmail_contact_form($form, $record, $attrib = null) |
|---|
| 435 | { |
|---|
| 436 | global $RCMAIL, $CONFIG; |
|---|
| 437 | |
|---|
| 438 | // Allow plugins to modify contact form content |
|---|
| 439 | $plugin = $RCMAIL->plugins->exec_hook('contact_form', array( |
|---|
| 440 | 'form' => $form, 'record' => $record)); |
|---|
| 441 | |
|---|
| 442 | $form = $plugin['form']; |
|---|
| 443 | $record = $plugin['record']; |
|---|
| 444 | $edit_mode = $RCMAIL->action != 'show'; |
|---|
| 445 | $del_button = $attrib['deleteicon'] ? html::img(array('src' => $CONFIG['skin_path'] . $attrib['deleteicon'], 'alt' => rcube_label('delete'))) : rcube_label('delete'); |
|---|
| 446 | unset($attrib['deleteicon']); |
|---|
| 447 | $out = ''; |
|---|
| 448 | |
|---|
| 449 | $RCMAIL->output->set_env('date_format', |
|---|
| 450 | strtr($RCMAIL->config->get('date_format', 'Y-m-d'), |
|---|
| 451 | array('y'=>'y', 'Y'=>'yy', 'm'=>'mm', 'n'=>'m', 'd'=>'dd', 'j'=>'d'))); |
|---|
| 452 | |
|---|
| 453 | // get default coltypes |
|---|
| 454 | $coltypes = $GLOBALS['CONTACT_COLTYPES']; |
|---|
| 455 | $coltype_labels = array(); |
|---|
| 456 | |
|---|
| 457 | foreach ($coltypes as $col => $prop) { |
|---|
| 458 | if ($prop['subtypes']) { |
|---|
| 459 | $subtype_names = array_map('rcmail_get_type_label', $prop['subtypes']); |
|---|
| 460 | $select_subtype = new html_select(array('name' => '_subtype_'.$col.'[]', 'class' => 'contactselectsubtype')); |
|---|
| 461 | $select_subtype->add($subtype_names, $prop['subtypes']); |
|---|
| 462 | $coltypes[$col]['subtypes_select'] = $select_subtype->show(); |
|---|
| 463 | } |
|---|
| 464 | if ($prop['childs']) { |
|---|
| 465 | foreach ($prop['childs'] as $childcol => $cp) |
|---|
| 466 | $coltype_labels[$childcol] = array('label' => $cp['label']); |
|---|
| 467 | } |
|---|
| 468 | } |
|---|
| 469 | |
|---|
| 470 | foreach ($form as $section => $fieldset) { |
|---|
| 471 | // skip empty sections |
|---|
| 472 | if (empty($fieldset['content'])) |
|---|
| 473 | continue; |
|---|
| 474 | |
|---|
| 475 | $select_add = new html_select(array('class' => 'addfieldmenu', 'rel' => $section)); |
|---|
| 476 | $select_add->add(rcube_label('addfield'), ''); |
|---|
| 477 | |
|---|
| 478 | // render head section with name fields (not a regular list of rows) |
|---|
| 479 | if ($section == 'head') { |
|---|
| 480 | $content = ''; |
|---|
| 481 | |
|---|
| 482 | // unset display name if it is composed from name parts |
|---|
| 483 | if ($record['name'] == rcube_addressbook::compose_display_name(array('name' => '') + (array)$record)) |
|---|
| 484 | unset($record['name']); |
|---|
| 485 | |
|---|
| 486 | // group fields |
|---|
| 487 | $field_blocks = array( |
|---|
| 488 | 'names' => array('prefix','firstname','middlename','surname','suffix'), |
|---|
| 489 | 'displayname' => array('name'), |
|---|
| 490 | 'nickname' => array('nickname'), |
|---|
| 491 | 'organization' => array('organization'), |
|---|
| 492 | 'department' => array('department'), |
|---|
| 493 | 'jobtitle' => array('jobtitle'), |
|---|
| 494 | ); |
|---|
| 495 | foreach ($field_blocks as $blockname => $colnames) { |
|---|
| 496 | $fields = ''; |
|---|
| 497 | foreach ($colnames as $col) { |
|---|
| 498 | // skip cols unknown to the backend |
|---|
| 499 | if (!$coltypes[$col]) |
|---|
| 500 | continue; |
|---|
| 501 | |
|---|
| 502 | // only string values are expected here |
|---|
| 503 | if (is_array($record[$col])) |
|---|
| 504 | $record[$col] = join(' ', $record[$col]); |
|---|
| 505 | |
|---|
| 506 | if ($RCMAIL->action == 'show') { |
|---|
| 507 | if (!empty($record[$col])) |
|---|
| 508 | $fields .= html::span('namefield ' . $col, Q($record[$col])) . " "; |
|---|
| 509 | } |
|---|
| 510 | else { |
|---|
| 511 | $colprop = (array)$fieldset['content'][$col] + (array)$coltypes[$col]; |
|---|
| 512 | $colprop['id'] = 'ff_'.$col; |
|---|
| 513 | if (empty($record[$col]) && !$colprop['visible']) { |
|---|
| 514 | $colprop['style'] = 'display:none'; |
|---|
| 515 | $select_add->add($colprop['label'], $col); |
|---|
| 516 | } |
|---|
| 517 | $fields .= rcmail_get_edit_field($col, $record[$col], $colprop, $colprop['type']); |
|---|
| 518 | } |
|---|
| 519 | } |
|---|
| 520 | $content .= html::div($blockname, $fields); |
|---|
| 521 | } |
|---|
| 522 | |
|---|
| 523 | if ($edit_mode) |
|---|
| 524 | $content .= html::p('addfield', $select_add->show(null)); |
|---|
| 525 | |
|---|
| 526 | $out .= html::tag('fieldset', $attrib, (!empty($fieldset['name']) ? html::tag('legend', null, Q($fieldset['name'])) : '') . $content) ."\n"; |
|---|
| 527 | continue; |
|---|
| 528 | } |
|---|
| 529 | |
|---|
| 530 | $content = ''; |
|---|
| 531 | if (is_array($fieldset['content'])) { |
|---|
| 532 | foreach ($fieldset['content'] as $col => $colprop) { |
|---|
| 533 | // remove subtype part of col name |
|---|
| 534 | list($field, $subtype) = explode(':', $col); |
|---|
| 535 | if (!$subtype) $subtype = 'home'; |
|---|
| 536 | $fullkey = $col.':'.$subtype; |
|---|
| 537 | |
|---|
| 538 | // skip cols unknown to the backend |
|---|
| 539 | if (!$coltypes[$field]) |
|---|
| 540 | continue; |
|---|
| 541 | |
|---|
| 542 | // merge colprop with global coltype configuration |
|---|
| 543 | $colprop += $coltypes[$field]; |
|---|
| 544 | $label = isset($colprop['label']) ? $colprop['label'] : rcube_label($col); |
|---|
| 545 | |
|---|
| 546 | // prepare subtype selector in edit mode |
|---|
| 547 | if ($edit_mode && is_array($colprop['subtypes'])) { |
|---|
| 548 | $subtype_names = array_map('rcmail_get_type_label', $colprop['subtypes']); |
|---|
| 549 | $select_subtype = new html_select(array('name' => '_subtype_'.$col.'[]', 'class' => 'contactselectsubtype')); |
|---|
| 550 | $select_subtype->add($subtype_names, $colprop['subtypes']); |
|---|
| 551 | } |
|---|
| 552 | else |
|---|
| 553 | $select_subtype = null; |
|---|
| 554 | |
|---|
| 555 | if (!empty($colprop['value'])) { |
|---|
| 556 | $values = (array)$colprop['value']; |
|---|
| 557 | } |
|---|
| 558 | else { |
|---|
| 559 | // iterate over possible subtypes and collect values with their subtype |
|---|
| 560 | if (is_array($colprop['subtypes'])) { |
|---|
| 561 | $values = $subtypes = array(); |
|---|
| 562 | foreach ($colprop['subtypes'] as $i => $st) { |
|---|
| 563 | $newval = false; |
|---|
| 564 | if ($record[$field.':'.$st]) { |
|---|
| 565 | $subtypes[count($values)] = $st; |
|---|
| 566 | $newval = $record[$field.':'.$st]; |
|---|
| 567 | } |
|---|
| 568 | else if ($i == 0 && $record[$field]) { |
|---|
| 569 | $subtypes[count($values)] = $st; |
|---|
| 570 | $newval = $record[$field]; |
|---|
| 571 | } |
|---|
| 572 | if ($newval !== false) { |
|---|
| 573 | if (is_array($newval) && isset($newval[0])) |
|---|
| 574 | $values = array_merge($values, $newval); |
|---|
| 575 | else |
|---|
| 576 | $values[] = $newval; |
|---|
| 577 | } |
|---|
| 578 | } |
|---|
| 579 | } |
|---|
| 580 | else { |
|---|
| 581 | $values = $record[$fullkey] ? $record[$fullkey] : $record[$field]; |
|---|
| 582 | $subtypes = null; |
|---|
| 583 | } |
|---|
| 584 | } |
|---|
| 585 | |
|---|
| 586 | // hack: create empty values array to force this field to be displayed |
|---|
| 587 | if (empty($values) && $colprop['visible']) |
|---|
| 588 | $values[] = ''; |
|---|
| 589 | |
|---|
| 590 | $rows = ''; |
|---|
| 591 | foreach ((array)$values as $i => $val) { |
|---|
| 592 | if ($subtypes[$i]) |
|---|
| 593 | $subtype = $subtypes[$i]; |
|---|
| 594 | |
|---|
| 595 | // render composite field |
|---|
| 596 | if ($colprop['type'] == 'composite') { |
|---|
| 597 | $composite = array(); $j = 0; |
|---|
| 598 | $template = $RCMAIL->config->get($col . '_template', '{'.join('} {', array_keys($colprop['childs'])).'}'); |
|---|
| 599 | foreach ($colprop['childs'] as $childcol => $cp) { |
|---|
| 600 | $childvalue = $val[$childcol] ? $val[$childcol] : $val[$j]; |
|---|
| 601 | |
|---|
| 602 | if ($edit_mode) { |
|---|
| 603 | if ($colprop['subtypes'] || $colprop['limit'] != 1) $cp['array'] = true; |
|---|
| 604 | $composite['{'.$childcol.'}'] = rcmail_get_edit_field($childcol, $childvalue, $cp, $cp['type']) . " "; |
|---|
| 605 | } |
|---|
| 606 | else { |
|---|
| 607 | $childval = $cp['render_func'] ? call_user_func($cp['render_func'], $childvalue, $childcol) : Q($childvalue); |
|---|
| 608 | $composite['{'.$childcol.'}'] = html::span('data ' . $childcol, $childval) . " "; |
|---|
| 609 | } |
|---|
| 610 | $j++; |
|---|
| 611 | } |
|---|
| 612 | |
|---|
| 613 | $coltypes[$field] += (array)$colprop; |
|---|
| 614 | $coltypes[$field]['count']++; |
|---|
| 615 | $val = preg_replace('/\{\w+\}/', '', strtr($template, $composite)); |
|---|
| 616 | } |
|---|
| 617 | else if ($edit_mode) { |
|---|
| 618 | // call callback to render/format value |
|---|
| 619 | if ($colprop['render_func']) |
|---|
| 620 | $val = call_user_func($colprop['render_func'], $val, $col); |
|---|
| 621 | |
|---|
| 622 | $coltypes[$field] = (array)$colprop + $coltypes[$field]; |
|---|
| 623 | |
|---|
| 624 | if ($colprop['subtypes'] || $colprop['limit'] != 1) |
|---|
| 625 | $colprop['array'] = true; |
|---|
| 626 | |
|---|
| 627 | // load jquery UI datepickert for date fields |
|---|
| 628 | if ($colprop['type'] == 'date') { |
|---|
| 629 | $colprop['class'] .= ($colprop['class'] ? ' ' : '') . 'datepicker'; |
|---|
| 630 | $val = rcmail_format_date_col($val); |
|---|
| 631 | } |
|---|
| 632 | |
|---|
| 633 | $val = rcmail_get_edit_field($col, $val, $colprop, $colprop['type']); |
|---|
| 634 | $coltypes[$field]['count']++; |
|---|
| 635 | } |
|---|
| 636 | else if ($colprop['render_func']) |
|---|
| 637 | $val = call_user_func($colprop['render_func'], $val, $col); |
|---|
| 638 | else if (is_array($colprop['options']) && isset($colprop['options'][$val])) |
|---|
| 639 | $val = $colprop['options'][$val]; |
|---|
| 640 | else |
|---|
| 641 | $val = Q($val); |
|---|
| 642 | |
|---|
| 643 | // use subtype as label |
|---|
| 644 | if ($colprop['subtypes']) |
|---|
| 645 | $label = rcmail_get_type_label($subtype); |
|---|
| 646 | |
|---|
| 647 | // add delete button/link |
|---|
| 648 | if ($edit_mode && !($colprop['visible'] && $colprop['limit'] == 1)) |
|---|
| 649 | $val .= html::a(array('href' => '#del', 'class' => 'contactfieldbutton deletebutton', 'title' => rcube_label('delete'), 'rel' => $col), $del_button); |
|---|
| 650 | |
|---|
| 651 | // display row with label |
|---|
| 652 | if ($label) { |
|---|
| 653 | $rows .= html::div('row', |
|---|
| 654 | html::div('contactfieldlabel label', $select_subtype ? $select_subtype->show($subtype) : Q($label)) . |
|---|
| 655 | html::div('contactfieldcontent '.$colprop['type'], $val)); |
|---|
| 656 | } |
|---|
| 657 | else // row without label |
|---|
| 658 | $rows .= html::div('row', html::div('contactfield', $val)); |
|---|
| 659 | } |
|---|
| 660 | |
|---|
| 661 | // add option to the add-field menu |
|---|
| 662 | if (!$colprop['limit'] || $coltypes[$field]['count'] < $colprop['limit']) { |
|---|
| 663 | $select_add->add($colprop['label'], $col); |
|---|
| 664 | $select_add->_count++; |
|---|
| 665 | } |
|---|
| 666 | |
|---|
| 667 | // wrap rows in fieldgroup container |
|---|
| 668 | if ($rows) { |
|---|
| 669 | $content .= html::tag('fieldset', array('class' => 'contactfieldgroup ' . ($colprop['subtypes'] ? 'contactfieldgroupmulti ' : '') . 'contactcontroller' . $col, 'style' => ($rows ? null : 'display:none')), |
|---|
| 670 | ($colprop['subtypes'] ? html::tag('legend', null, Q($colprop['label'])) : ' ') . |
|---|
| 671 | $rows); |
|---|
| 672 | } |
|---|
| 673 | } |
|---|
| 674 | |
|---|
| 675 | if (!$content) |
|---|
| 676 | continue; |
|---|
| 677 | |
|---|
| 678 | // also render add-field selector |
|---|
| 679 | if ($edit_mode) |
|---|
| 680 | $content .= html::p('addfield', $select_add->show(null, array('style' => $select_add->_count ? null : 'display:none'))); |
|---|
| 681 | |
|---|
| 682 | $content = html::div(array('id' => 'contactsection' . $section), $content); |
|---|
| 683 | } |
|---|
| 684 | else { |
|---|
| 685 | $content = $fieldset['content']; |
|---|
| 686 | } |
|---|
| 687 | |
|---|
| 688 | if ($content) |
|---|
| 689 | $out .= html::tag('fieldset', null, html::tag('legend', null, Q($fieldset['name'])) . $content) ."\n"; |
|---|
| 690 | } |
|---|
| 691 | |
|---|
| 692 | if ($edit_mode) { |
|---|
| 693 | $RCMAIL->output->set_env('coltypes', $coltypes + $coltype_labels); |
|---|
| 694 | $RCMAIL->output->set_env('delbutton', $del_button); |
|---|
| 695 | $RCMAIL->output->add_label('delete'); |
|---|
| 696 | } |
|---|
| 697 | |
|---|
| 698 | return $out; |
|---|
| 699 | } |
|---|
| 700 | |
|---|
| 701 | |
|---|
| 702 | function rcmail_contact_photo($attrib) |
|---|
| 703 | { |
|---|
| 704 | global $SOURCE_ID, $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG; |
|---|
| 705 | |
|---|
| 706 | if ($result = $CONTACTS->get_result()) |
|---|
| 707 | $record = $result->first(); |
|---|
| 708 | |
|---|
| 709 | $photo_img = $attrib['placeholder'] ? $CONFIG['skin_path'] . $attrib['placeholder'] : 'program/blank.gif'; |
|---|
| 710 | $RCMAIL->output->set_env('photo_placeholder', $photo_img); |
|---|
| 711 | unset($attrib['placeholder']); |
|---|
| 712 | |
|---|
| 713 | if (preg_match('!^https?://!i', $record['photo'])) |
|---|
| 714 | $photo_img = $record['photo']; |
|---|
| 715 | else if ($record['photo']) |
|---|
| 716 | $photo_img = $RCMAIL->url(array('_action' => 'photo', '_cid' => $record['ID'], '_source' => $SOURCE_ID)); |
|---|
| 717 | else |
|---|
| 718 | $ff_value = '-del-'; // will disable delete-photo action |
|---|
| 719 | |
|---|
| 720 | $img = html::img(array('src' => $photo_img, 'border' => 1, 'alt' => '')); |
|---|
| 721 | $content = html::div($attrib, $img); |
|---|
| 722 | |
|---|
| 723 | if ($CONTACT_COLTYPES['photo'] && ($RCMAIL->action == 'edit' || $RCMAIL->action == 'add')) { |
|---|
| 724 | $RCMAIL->output->add_gui_object('contactphoto', $attrib['id']); |
|---|
| 725 | $hidden = new html_hiddenfield(array('name' => '_photo', 'id' => 'ff_photo', 'value' => $ff_value)); |
|---|
| 726 | $content .= $hidden->show(); |
|---|
| 727 | } |
|---|
| 728 | |
|---|
| 729 | return $content; |
|---|
| 730 | } |
|---|
| 731 | |
|---|
| 732 | |
|---|
| 733 | function rcmail_format_date_col($val) |
|---|
| 734 | { |
|---|
| 735 | global $RCMAIL; |
|---|
| 736 | return format_date($val, $RCMAIL->config->get('date_format', 'Y-m-d'), false); |
|---|
| 737 | } |
|---|
| 738 | |
|---|
| 739 | |
|---|
| 740 | /** |
|---|
| 741 | * Returns contact ID(s) and source(s) from GET/POST data |
|---|
| 742 | * |
|---|
| 743 | * @return array List of contact IDs per-source |
|---|
| 744 | */ |
|---|
| 745 | function rcmail_get_cids() |
|---|
| 746 | { |
|---|
| 747 | // contact ID (or comma-separated list of IDs) is provided in two |
|---|
| 748 | // forms. If _source is an empty string then the ID is a string |
|---|
| 749 | // containing contact ID and source name in form: <ID>-<SOURCE> |
|---|
| 750 | |
|---|
| 751 | $cid = get_input_value('_cid', RCUBE_INPUT_GPC); |
|---|
| 752 | $source = (string) get_input_value('_source', RCUBE_INPUT_GPC); |
|---|
| 753 | |
|---|
| 754 | if (!preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid)) { |
|---|
| 755 | return array(); |
|---|
| 756 | } |
|---|
| 757 | |
|---|
| 758 | $cid = explode(',', $cid); |
|---|
| 759 | $got_source = strlen($source); |
|---|
| 760 | $result = array(); |
|---|
| 761 | |
|---|
| 762 | // create per-source contact IDs array |
|---|
| 763 | foreach ($cid as $id) { |
|---|
| 764 | // if _source is not specified we'll find it from decoded ID |
|---|
| 765 | if (!$got_source) { |
|---|
| 766 | if ($sep = strrpos($id, '-')) { |
|---|
| 767 | $contact_id = substr($id, 0, $sep); |
|---|
| 768 | $source_id = substr($id, $sep+1); |
|---|
| 769 | if (strlen($source_id)) { |
|---|
| 770 | $result[(string)$source_id][] = $contact_id; |
|---|
| 771 | } |
|---|
| 772 | } |
|---|
| 773 | } |
|---|
| 774 | else { |
|---|
| 775 | $result[$source][] = $id; |
|---|
| 776 | } |
|---|
| 777 | } |
|---|
| 778 | |
|---|
| 779 | return $result; |
|---|
| 780 | } |
|---|
| 781 | |
|---|
| 782 | // register UI objects |
|---|
| 783 | $OUTPUT->add_handlers(array( |
|---|
| 784 | 'directorylist' => 'rcmail_directory_list', |
|---|
| 785 | // 'groupslist' => 'rcmail_contact_groups', |
|---|
| 786 | 'addresslist' => 'rcmail_contacts_list', |
|---|
| 787 | 'addressframe' => 'rcmail_contact_frame', |
|---|
| 788 | 'recordscountdisplay' => 'rcmail_rowcount_display', |
|---|
| 789 | 'searchform' => array($OUTPUT, 'search_form') |
|---|
| 790 | )); |
|---|
| 791 | |
|---|
| 792 | // register action aliases |
|---|
| 793 | $RCMAIL->register_action_map(array( |
|---|
| 794 | 'add' => 'edit.inc', |
|---|
| 795 | 'photo' => 'show.inc', |
|---|
| 796 | 'group-create' => 'groups.inc', |
|---|
| 797 | 'group-rename' => 'groups.inc', |
|---|
| 798 | 'group-delete' => 'groups.inc', |
|---|
| 799 | 'group-addmembers' => 'groups.inc', |
|---|
| 800 | 'group-delmembers' => 'groups.inc', |
|---|
| 801 | 'search-create' => 'search.inc', |
|---|
| 802 | 'search-delete' => 'search.inc', |
|---|
| 803 | )); |
|---|