From: jitendrapurohit Date: Fri, 4 Mar 2016 06:12:31 +0000 (+0530) Subject: add signature and minor optimisation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=be7255003d221f398723679fbaf90dc6ad53b445;p=civicrm-core.git add signature and minor optimisation --- diff --git a/CRM/Admin/Form/PaymentProcessor.php b/CRM/Admin/Form/PaymentProcessor.php index f687933d49..d392c4337f 100644 --- a/CRM/Admin/Form/PaymentProcessor.php +++ b/CRM/Admin/Form/PaymentProcessor.php @@ -378,10 +378,11 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form { * @param bool $test */ public function updatePaymentProcessor(&$values, $domainID, $test) { - if ($test == TRUE) { - $values['user_name'] = $values['test_user_name']; - $values['password'] = $values['test_password']; - } + if ($test) { + foreach (array('user_name', 'password', 'signature') as $field) { + $values[$field] = empty($values["test_{$field}"]) ? CRM_Utils_Array::value($field, $values) : $values["test_{$field}"]; + } + } $params = array_merge(array( 'id' => $test ? $this->_testID : $this->_id, 'domain_id' => $domainID,