X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FInline.php;h=01289571a68d8ba2a2f2e3b68ec4f67678eeba8a;hb=21d5ed51a2ed5ed341adeee8b2877efb1d51531a;hp=6a88ac5912213eda89299ee0bee444679043ca37;hpb=9c2e4fb9824d9913d19a7f7e24ada6093a409461;p=civicrm-core.git diff --git a/CRM/Contact/Form/Inline.php b/CRM/Contact/Form/Inline.php index 6a88ac5912..01289571a6 100644 --- a/CRM/Contact/Form/Inline.php +++ b/CRM/Contact/Form/Inline.php @@ -140,14 +140,13 @@ abstract class CRM_Contact_Form_Inline extends CRM_Core_Form { } /** - * Final response from successful form submit - * - * @param response: array - data to send to the client + * Common function for all inline contact edit forms + * Prepares ajaxResponse * * @return void * @protected */ - protected function response($response = array()) { + protected function response() { // Load changelog footer from template $smarty = CRM_Core_Smarty::singleton(); $smarty->assign('contactId', $this->_contactId); @@ -157,27 +156,16 @@ abstract class CRM_Contact_Form_Inline extends CRM_Core_Form { 'contact_view_options', TRUE ); $smarty->assign('changeLog', $viewOptions['log']); - $response = array_merge( + $this->ajaxResponse = array_merge( array( - 'status' => 'save', 'changeLog' => array( 'count' => CRM_Contact_BAO_Contact::getCountComponent('log', $this->_contactId), 'markup' => $smarty->fetch('CRM/common/contactFooter.tpl'), ), ), - $response, + $this->ajaxResponse, CRM_Contact_Form_Inline_Lock::getResponse($this->_contactId) ); - $this->postProcessHook(); - // CRM-11831 @see http://www.malsup.com/jquery/form/#file-upload - $xhr = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'; - if (!$xhr) { - echo ''; - } - CRM_Utils_System::civiExit(); + // Note: Post hooks will be called by CRM_Core_Form::mainProcess } }