You are here

function _eloqua_webform_update in Eloqua 7

Same name and namespace in other branches
  1. 6 eloqua.inc \_eloqua_webform_update()
  2. 7.2 eloqua_webform/eloqua_webform.inc \_eloqua_webform_update()

Updates the webform object from the database.

Parameters

object $webform: The webform.

Return value

bool The result of the update.

2 calls to _eloqua_webform_update()
eloqua_webform_create in eloqua_webform/eloqua_webform.inc
Creates webform settings from the database.
eloqua_webform_update in eloqua_webform/eloqua_webform.inc
Updates a webform settings from the database.

File

eloqua_webform/eloqua_webform.inc, line 177
Eloqua Helper functions and constants

Code

function _eloqua_webform_update($webform) {
  $fields = array(
    'form_name' => $webform->{'form_name'},
    'is_active' => $webform->{'is_active'},
    'data' => serialize($webform->{'data'}),
  );
  $result = db_update('eloqua_webform')
    ->fields($fields)
    ->condition('nid', $webform->{'nid'})
    ->execute();
  return is_numeric($result) ? $result > 0 : FALSE;
}