Changeset 333c48c in github


Ignore:
Timestamp:
Feb 23, 2010 1:31:23 PM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
7481dd9
Parents:
6a31558
Message:
  • Squirrelmail_usercopy: support reply-to field (#1486506)
  • Use rcube_user::insert_identity() instead of custom SQL query in rcube_user::create()
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r1617dbb r333c48c  
    22=========================== 
    33 
     4- Squirrelmail_usercopy: support reply-to field (#1486506) 
    45- Fix IE spellcheck suggestion popup issue (#1486471) 
    56- Fix email address auto-completion shows regexp pattern (#1486258) 
  • plugins/squirrelmail_usercopy/squirrelmail_usercopy.php

    r9b94eb6 r333c48c  
    66 * Currently only file-based data storage of Squirrelmail is supported. 
    77 * 
    8  * @version 1.0 
     8 * @version 1.1 
    99 * @author Thomas Bruederli 
    1010 */ 
     
    3434        public function create_identity($p) 
    3535        { 
     36                $rcmail = rcmail::get_instance(); 
     37 
    3638                // only execute on login 
    37                 if ($p['login'] && $this->prefs) { 
     39                if ($rcmail->task == 'login' && $this->prefs) { 
    3840                        if ($this->prefs['full_name']) 
    3941                                $p['record']['name'] = $this->prefs['full_name']; 
     
    4244                        if ($this->prefs['signature']) 
    4345                                $p['record']['signature'] = $this->prefs['signature']; 
    44                  
     46                        if ($this->prefs['reply-to'])  
     47                                $p['record']['reply-to'] = $this->prefs['reply-to'];             
     48 
    4549                        // copy address book 
    46                         $rcmail = rcmail::get_instance(); 
    4750                        $contacts = $rcmail->get_address_book(null, true); 
    4851                        if ($contacts && count($this->abook)) { 
  • program/include/rcube_user.php

    r6a31558 r333c48c  
    216216      return false; 
    217217 
     218    unset($data['user_id']); 
     219 
    218220    $insert_cols = $insert_values = array(); 
    219221    foreach ((array)$data as $col => $value) 
     
    423425            'email' => $email, 
    424426            'standard' => $standard, 
    425             'signature' => '', 
    426427          ), 
    427428        )); 
    428429           
    429430        if (!$plugin['abort'] && $plugin['record']['email']) { 
    430           $dbh->query( 
    431               "INSERT INTO ".get_table_name('identities')." 
    432                 (user_id, del, standard, name, email, signature) 
    433                VALUES (?, 0, ?, ?, ?, ?)", 
    434               $user_id, 
    435               $plugin['record']['standard'], 
    436               $plugin['record']['name'] != NULL ? $plugin['record']['name'] : '', 
    437               $plugin['record']['email'], 
    438               $plugin['record']['signature']); 
     431          $rcmail->user->insert_identity($plugin['record']); 
    439432        } 
    440433        $standard = 0; 
Note: See TracChangeset for help on using the changeset viewer.