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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • civicrm_pre syntax
Pages: [1]

Author Topic: civicrm_pre syntax  (Read 1252 times)

m.e.

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.0.9
  • CMS version: Drupal 7.9
civicrm_pre syntax
October 28, 2011, 11:04:12 pm
The developer of a CiviCRM-integrated module I'm using on a D7+ CiviCRM 4.0.7 test site suggests that I need to look at the civicrm_pre and _post sections in his .module file in order to troubleshoot a problem. I'm a complete noob with hooks/API, though.

Is the syntax

Code: [Select]
civicrm_pre($op, $object_type, $contact_id, &$ref)
correct for my versions? If so, what does the &$ref argument represent?

Thanks in advance for any help.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: civicrm_pre syntax
October 29, 2011, 05:36:37 pm
Hi. The syntax is here http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmpre and it's:

Code: [Select]
hook_civicrm_pre( $op, $objectName, $id, &$params )
which may correspond to what you have. I don't think this syntax is the issue.

Having briefly examined the site in question myself, I would venture to say that a misconfigured server may be the issue, as it seems to run correctly on a proper server.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • civicrm_pre syntax

This forum was archived on 2017-11-26.