Skip to content
Snippets Groups Projects
Unverified Commit 824c92ce authored by eileen's avatar eileen :8ball: Committed by GitHub
Browse files

Merge pull request #13995 from eileenmcnaughton/loc_title

financial#2 Update new payment_processor.title field to be localisable
parents 377cbe11 4c257e17
Branches
Tags
No related merge requests found
......@@ -129,6 +129,9 @@ class CRM_Core_I18n_SchemaStructure {
'description' => "text",
'options' => "text",
],
'civicrm_payment_processor' => [
'title' => "varchar(127)",
],
'civicrm_membership_type' => [
'name' => "varchar(128)",
'description' => "varchar(255)",
......@@ -486,6 +489,11 @@ class CRM_Core_I18n_SchemaStructure {
'type' => "Text",
],
],
'civicrm_payment_processor' => [
'title' => [
'type' => "Text",
],
],
'civicrm_membership_type' => [
'name' => [
'type' => "Text",
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:42c6dc8a71daeb67aaa687156121ebf4)
* (GenCodeChecksum:83f0467b531d70e84945e9c55a8824b6)
*/
/**
......@@ -254,7 +254,7 @@ class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO {
'table_name' => 'civicrm_payment_processor',
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
'localizable' => 1,
'html' => [
'type' => 'Text',
],
......@@ -523,7 +523,7 @@ class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO {
* @return string
*/
public static function getTableName() {
return self::$_tableName;
return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
}
/**
......
......@@ -74,12 +74,13 @@ class CRM_Upgrade_Incremental_php_FiveThirteen extends CRM_Upgrade_Incremental_B
* @param string $rev
*/
public function upgrade_5_13_alpha1($rev) {
$this->addTask('Add title to civicrm_payment_processor', 'addColumn',
'civicrm_payment_processor', 'title', "text COMMENT 'Payment Processor Descriptive Name.'", TRUE, '5.13.alpha1'
);
$this->addTask('Add cancel reason column to civicrm_contribution_recur', 'addColumn',
'civicrm_contribution_recur', 'cancel_reason', "text COMMENT 'Free text field for a reason for cancelling'", FALSE
);
$this->addTask('Add title to civicrm_payment_processor', 'addColumn',
'civicrm_payment_processor', 'title', "text COMMENT 'Payment Processor Descriptive Name.'", FALSE
);
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
}
}
......@@ -92,7 +92,7 @@ WHERE {$key}.id IS NULL";
if ($value != 'contact_id') {
$query .= " AND contri_recur.{$value} IS NOT NULL ";
}
$dao = CRM_Core_DAO::executeQuery($query);
$dao = CRM_Core_DAO::executeQuery($query, [], TRUE, NULL, FALSE, FALSE);
if ($dao->N) {
$invalidDataMessage = '<strong>Oops, it looks like you have orphaned recurring contribution records in your database. Before this upgrade can complete they will need to be fixed or deleted. <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Fixing+Orphaned+Contribution+Recur+Records" target="_blank">You can review steps to correct this situation on the documentation wiki.</a></strong>';
CRM_Core_Error::fatal($invalidDataMessage);
......
......@@ -52,6 +52,7 @@
<title>Payment Processor Title</title>
<type>varchar</type>
<length>127</length>
<localizable>true</localizable>
<html>
<type>Text</type>
</html>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment