Skip to content

Commit

Permalink
CRM-21311: Updating civicrm_option_value name to lowercase.
Browse files Browse the repository at this point in the history
  • Loading branch information
agilewarealok committed Dec 5, 2017
1 parent fb3e8df commit 436d557
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CRM/Core/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,10 @@ protected function getDirectDebitFormFields() {
*/
public function getPaymentFormFieldsMetadata() {
$creditCardType = array('' => ts('- select -')) + CRM_Contribute_PseudoConstant::creditCard();
$isCVVRequired = Civi::settings()->get('cvv_backoffice_required');
if (!$this->isBackOffice()) {
$isCVVRequired = TRUE;
}
return array(
'credit_card_number' => array(
'htmlType' => 'text',
Expand Down
10 changes: 10 additions & 0 deletions CRM/Upgrade/Incremental/php/FourSeven.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ public function upgrade_4_7_27($rev) {
$this->addTask('CRM-12167 - Add visibility column to civicrm_price_field_value', 'addColumn',
'civicrm_price_field_value', 'visibility_id', 'int(10) unsigned DEFAULT 1 COMMENT "Implicit FK to civicrm_option_group with name = \'visibility\'"');
$this->addTask('Remove broken Contribution_logging reports', 'removeContributionLoggingReports');
$this->addTask('CRM-21311 - Update option value name to lowercase', 'optionValueNameToLowercase');
}

/**
Expand Down Expand Up @@ -1388,4 +1389,13 @@ public static function civiMailingCreatedDateNull(CRM_Queue_TaskContext $ctx) {
return TRUE;
}

/**
* CRM-21311 Updating civicrm_option_value name to lowercase.
* @return bool
*/
public static function optionValueNameToLowercase(CRM_Queue_TaskContext $ctx) {
CRM_Core_DAO::executeQuery("UPDATE civicrm_option_value v INNER JOIN civicrm_option_group g ON v.option_group_id = g.id AND g.name= 'accept_creditcard' SET v.name = lower(v.name), v.is_reserved = 1;");
return TRUE;
}

}

0 comments on commit 436d557

Please sign in to comment.