You are here

function eloqua_post_update in Eloqua 6

Same name and namespace in other branches
  1. 7.2 eloqua_webform/eloqua_webform.inc \eloqua_post_update()
  2. 7 eloqua_webform/eloqua_webform.inc \eloqua_post_update()

Updates a post from the database @hook eloqua_post_update

Parameters

$post object:

Return value

boolean

1 call to eloqua_post_update()
_eloqua_cron in ./eloqua.cron.inc
Implementation of hook_cron()

File

./eloqua.inc, line 488

Code

function eloqua_post_update($post) {
  if (!is_object($post)) {
    $type = gettype($post);
    watchdog(ELOQUA_WATCHDOG_CATEGORY, t('Invalid argument sent to !module_name (!type).', array(
      '!module_name' => __FUNCTION__,
      '!type' => $type,
    )), array(), WATCHDOG_DEBUG);
    return FALSE;
  }

  // Can't update the obvious invalid ppid of '0'...
  if (empty($post->{ELOQUA_POST_FIELD_POST_ID})) {
    return FALSE;
  }
  foreach (module_implements('eloqua_post_update') as $module_name) {
    $method = $module_name . '_eloqua_post_update';
    $method($post);
  }

  // Save the result to the database
  $result = _eloqua_post_update($post);
  return $result;
}