Mwalker has uploaded a new change for review.
https://gerrit.wikimedia.org/r/71650
Change subject: Apparently Civi only likes names 64 Chars or Less
......................................................................
Apparently Civi only likes names 64 Chars or Less
Change-Id: Id05bb3b70cfff610e1d6bd3c1edf7dfa01a3f72c
---
M sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
1 file changed, 8 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/50/71650/1
diff --git a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
index 416373f..94966df 100644
--- a/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_common/wmf_civicrm/wmf_civicrm.module
@@ -694,14 +694,17 @@
}
// Create the contact record
+ $fname = substr( $msg['first_name'], 0, 64 );
+ $mname = substr( $msg['middle_name'], 0, 64 );
+ $lname = substr( $msg['last_name'], 0, 64 );
$contact = array(
'id' => $contact_id,
'contact_type' => $msg['contact_type'],
- 'first_name' => $msg['first_name'],
- 'middle_name' => $msg['middle_name'],
- 'last_name' => $msg['last_name'],
- 'sort_name' => trim( $msg['last_name'] . ', ' . $msg['first_name'], '
,' ),
- 'display_name' => trim( $msg['first_name'] . ' ' . $msg['last_name'] ),
+ 'first_name' => $fname,
+ 'middle_name' => $mname,
+ 'last_name' => $lname,
+ 'sort_name' => trim( $lname . ', ' . $fname, ' ,' ),
+ 'display_name' => trim( $fname . ' ' . $lname ),
'do_not_trade' => $msg['anonymous'],
'is_opt_out' => '0', // $msg['optout'], // we don't offer an option to
unsub on contrib, eliminate bugs
'contact_source' => $msg['contact_source'],
--
To view, visit https://gerrit.wikimedia.org/r/71650
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id05bb3b70cfff610e1d6bd3c1edf7dfa01a3f72c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Mwalker <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits