Changeset 8e3a603 in github


Ignore:
Timestamp:
Apr 13, 2010 3:24:09 AM (3 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
ed60fef
Parents:
6b01133
Message:

Assign newly created contacts to the active group (#1486626) and fix group selection display (#1486619)

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rbc49601 r8e3a603  
    22=========================== 
    33 
     4- Fix address book/group selection (#1486619) 
     5- Assign newly created contacts to the active group (#1486626) 
    46- Added option not to mark messages as read when viewed in preview pane (#1485012) 
    57- Allow plugins modify the Sent folder when composing (#1486548) 
  • program/include/rcube_contacts.php

    r04adaac r8e3a603  
    213213      { 
    214214        $ids = !is_array($value) ? explode(',', $value) : $value; 
    215         $add_where[] = $this->primary_key.' IN ('.join(',', $ids).')'; 
     215        $add_where[] = 'c.' . $this->primary_key.' IN ('.join(',', $ids).')'; 
    216216      } 
    217217      else if ($strict) 
     
    337337      $insert_id = $this->db->insert_id('contacts'); 
    338338    } 
     339     
     340    // also add the newly created contact to the active group 
     341    if ($insert_id && $this->group_id) 
     342      $this->add_to_group($this->group_id, $insert_id); 
    339343 
    340344    return $insert_id; 
  • program/js/app.js

    rbc49601 r8e3a603  
    526526 
    527527          this.list_contacts(props); 
    528           this.enable_command('add', 'import', (this.env.address_sources && !this.env.address_sources[props].readonly)); 
     528          this.enable_command('add', 'import', (this.env.address_sources && !this.env.address_sources[this.env.source].readonly)); 
    529529          } 
    530530        break; 
     
    34443444      page = this.env.current_page = 1; 
    34453445 
    3446     this.select_folder(src, this.env.source); 
    3447     this.select_folder(group, this.env.group, 'rcmliG'); 
     3446    this.select_folder((group ? 'G'+group : src), (this.env.group ? 'G'+this.env.group : this.env.source)); 
    34483447     
    34493448    this.env.source = src; 
     
    35173516      { 
    35183517      this.set_busy(true); 
    3519       target.location.href = this.env.comm_path+'&_action='+action+'&_source='+urlencode(this.env.source)+'&_cid='+urlencode(cid) + add_url; 
     3518      target.location.href = this.env.comm_path+'&_action='+action+'&_source='+urlencode(this.env.source)+'&_gid='+urlencode(this.env.group)+'&_cid='+urlencode(cid) + add_url; 
    35203519      } 
    35213520    return true; 
  • program/steps/addressbook/edit.inc

    r57f0c81 r8e3a603  
    8989  if (empty($EDIT_FORM)) { 
    9090    $hiddenfields = new html_hiddenfield(array('name' => '_source', 'value' => get_input_value('_source', RCUBE_INPUT_GPC))); 
     91    $hiddenfields->add(array('name' => '_gid', 'value' => $CONTACTS->group_id)); 
    9192     
    9293    if (($result = $CONTACTS->get_result()) && ($record = $result->first())) 
Note: See TracChangeset for help on using the changeset viewer.