Changeset 2450 in subversion
- Timestamp:
- May 4, 2009 2:53:56 AM (4 years ago)
- Location:
- trunk/roundcubemail/program/steps
- Files:
-
- 3 edited
-
addressbook/copy.inc (modified) (1 diff)
-
addressbook/import.inc (modified) (4 diffs)
-
mail/addcontact.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/steps/addressbook/copy.inc
r1712 r2450 27 27 $TARGET = $RCMAIL->get_address_book($target); 28 28 29 if ($TARGET && $TARGET->ready && !$TARGET->readonly) 30 $success = $TARGET->insert($CONTACTS->search($CONTACTS->primary_key, $cid), true); 29 if ($TARGET && $TARGET->ready && !$TARGET->readonly) { 30 $plugin = $RCMAIL->plugins->exec_hook('create_contact', array('record' => $CONTACTS->search($CONTACTS->primary_key, $cid), 'source' => $target)); 31 $a_record = $plugin['record']; 32 33 if (!$plugin['abort']) 34 $success = $TARGET->insert($CONTACTS->search($a_record, true); 35 } 31 36 32 37 if (empty($success)) -
trunk/roundcubemail/program/steps/addressbook/import.inc
r2237 r2450 76 76 global $IMPORT_STATS, $OUTPUT; 77 77 78 $attrib += array('type' => "input");78 $attrib += array('type' => 'input'); 79 79 unset($attrib['name']); 80 80 81 81 if (is_object($IMPORT_STATS)) { 82 82 $attrib['class'] = trim($attrib['class'] . ' mainaction'); 83 $out = $OUTPUT->button(array('command' => "list", 'label' => "done") + $attrib);83 $out = $OUTPUT->button(array('command' => 'list', 'label' => 'done') + $attrib); 84 84 } 85 85 else { 86 $out = $OUTPUT->button(array('command' => "list", 'label' => "cancel") + $attrib);86 $out = $OUTPUT->button(array('command' => 'list', 'label' => 'cancel') + $attrib); 87 87 $out .= ' '; 88 88 $attrib['class'] = trim($attrib['class'] . ' mainaction'); 89 $out .= $OUTPUT->button(array('command' => "import", 'label' => "import") + $attrib);89 $out .= $OUTPUT->button(array('command' => 'import', 'label' => 'import') + $attrib); 90 90 } 91 91 … … 143 143 } 144 144 145 $ success = $CONTACTS->insert(array(145 $a_record = array( 146 146 'name' => $vcard->displayname, 147 147 'firstname' => $vcard->firstname, … … 149 149 'email' => $email, 150 150 'vcard' => $vcard->export(), 151 ) );151 ); 152 152 153 if ($success) { 153 $plugin = $RCMAIL->plugins->exec_hook('create_contact', array('record' => $a_record, 'source' => null)); 154 $a_record = $plugin['record']; 155 156 // insert record and send response 157 if (!$plugin['abort'] && ($success = $CONTACTS->insert($a_record))) { 154 158 $IMPORT_STATS->inserted++; 155 159 $IMPORT_STATS->names[] = $vcard->displayname; 156 } 157 else { 160 } else { 158 161 $IMPORT_STATS->errors++; 159 162 } … … 166 169 if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { 167 170 $OUTPUT->show_message('filesizeerror', 'error', array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize'))))); 168 } 169 else { 171 } else { 170 172 $OUTPUT->show_message('fileuploaderror', 'error'); 171 173 } -
trunk/roundcubemail/program/steps/mail/addcontact.inc
r2447 r2450 44 44 else 45 45 { 46 $plugin = $RCMAIL->plugins->exec_hook('create_contact', array('record' => $contact, 'source' => get_input_value('_source', RCUBE_INPUT_GPC)));46 $plugin = $RCMAIL->plugins->exec_hook('create_contact', array('record' => $contact, 'source' => null)); 47 47 $contact = $plugin['record']; 48 48
Note: See TracChangeset
for help on using the changeset viewer.
