You are here

function webform_update in Webform 6.2

Same name and namespace in other branches
  1. 5.2 webform.module \webform_update()
  2. 5 webform.module \webform_update()

Implementation of hook_update().

File

./webform.module, line 502

Code

function webform_update($node) {

  // Update the webform by deleting existing data and replacing with the new.
  db_query('DELETE FROM {webform} WHERE nid = %d', $node->nid);
  db_query('DELETE FROM {webform_component} WHERE nid = %d', $node->nid);
  db_query('DELETE FROM {webform_roles} WHERE nid = %d', $node->nid);
  webform_insert($node);
}