CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Duplicate code to display profiles in events and contribution pages
Pages: [1]

Author Topic: Duplicate code to display profiles in events and contribution pages  (Read 336 times)

John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Duplicate code to display profiles in events and contribution pages
February 10, 2016, 08:42:53 am
I'm not sure when I'll have time to look at this properly, but I thought I'd highlight this as an issue.

Events and Contribution pages both use code to display the values of fields in a profile, on confirmation pages. They eventually perform exactly the same thing, but do it in two different ways. This seems like unnecessary duplication and leads to odd issues (like CRM-18013) that appear in one case, but not the other.

Events go via: CRM_Event_BAO_Event::displayProfile
Contribution pages go via: CRM_Core_BAO_UFGroup::getValues

Presumably the function used in events should be altered to make better use of existing functionality in CRM_Core_BAO?

Or is this sort of thing part of the 'flexible forms' roadmap for v5?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Duplicate code to display profiles in events and contribution pages

This forum was archived on 2017-11-26.