You are here

function eloqua_post_delete in Eloqua 6

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

Deletes a post object from the database

Parameters

$post_id integer:

Return value

boolean

File

./eloqua.inc, line 517

Code

function eloqua_post_delete($post_id) {
  if (!is_numeric($post_id)) {
    $type = gettype($post_id);
    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_id)) {
    return FALSE;
  }
  foreach (module_implements('eloqua_post_delete') as $module_name) {
    $method = $module_name . '_eloqua_post_delete';
    $method($post_id);
  }
  $result = _eloqua_post_delete($post_id);
  return $result;
}