Changeset 4649 in subversion
- Timestamp:
- Apr 12, 2011 2:05:36 PM (2 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
program/steps/addressbook/edit.inc (modified) (2 diffs)
-
program/steps/addressbook/save.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r4647 r4649 2 2 =========================== 3 3 4 - Keep all submitted data if contact form validation fails (#1487865) 5 - Handle uncode strings in rcube_addressbook::normalize_string() (#1487866) 4 6 - Fix bug where template name without plugin prefix was used in render_page hook 5 7 - Fix handling of debug_level=4 in ajax requests (#1487831) -
trunk/roundcubemail/program/steps/addressbook/edit.inc
r4499 r4649 32 32 33 33 34 function rcmail_get_edit_record() 35 { 36 global $RCMAIL, $CONTACTS; 37 38 // check if we have a valid result 39 if ($GLOBALS['EDIT_RECORD']) { 40 $record = $GLOBALS['EDIT_RECORD']; 41 } 42 else if ($RCMAIL->action != 'add' 43 && !(($result = $CONTACTS->get_result()) && ($record = $result->first())) 44 ) { 45 $RCMAIL->output->show_message('contactnotfound'); 46 return false; 47 } 48 49 return $record; 50 } 51 34 52 function rcmail_contact_edithead($attrib) 35 53 { 36 global $RCMAIL, $CONTACTS;37 38 54 // check if we have a valid result 39 if ($RCMAIL->action != 'add' 40 && !(($result = $CONTACTS->get_result()) && ($record = $result->first())) 41 ) { 42 $RCMAIL->output->show_message('contactnotfound'); 43 return false; 44 } 45 55 $record = rcmail_get_edit_record(); 46 56 $i_size = !empty($attrib['size']) ? $attrib['size'] : 20; 47 57 … … 75 85 function rcmail_contact_editform($attrib) 76 86 { 77 global $RCMAIL, $CONTACTS, $CONTACT_COLTYPES; 78 79 // check if we have a valid result 80 if ($RCMAIL->action != 'add' 81 && !(($result = $CONTACTS->get_result()) && ($record = $result->first())) 82 ) { 83 $RCMAIL->output->show_message('contactnotfound'); 84 return false; 85 } 87 global $RCMAIL, $CONTACT_COLTYPES; 88 89 $record = rcmail_get_edit_record(); 86 90 87 91 // add some labels to client -
trunk/roundcubemail/program/steps/addressbook/save.inc
r4604 r4649 140 140 $err = (array)$CONTACTS->get_error() + array('message' => 'formincomplete', 'type' => 'warning'); 141 141 $OUTPUT->show_message($err['message'], $err['type']); 142 $GLOBALS['EDIT_RECORD'] = $a_record; // store submitted data to be used in edit form 142 143 rcmail_overwrite_action($return_action); 143 144 return;
Note: See TracChangeset
for help on using the changeset viewer.
