You are here

function hosting_web_server_update in Hosting 5

Implementation of hook_update().

As an existing node is being updated in the database, we need to do our own database updates.

File

web_server/hosting_web_server.module, line 306
Web server node type is defined here.

Code

function hosting_web_server_update($node) {

  // if this is a new node or we're adding a new revision,
  if ($node->revision) {
    hosting_web_server_insert($node);
  }
  else {
    db_query("UPDATE {hosting_web_server} SET \n                  ip_address = '%s', script_user = '%s', web_group = '%s', \n                  config_path = '%s', backup_path = '%s', restart_cmd = '%s',\n                  drush_path = '%s'\n              WHERE \n                  vid = %d", $node->ip_address, $node->script_user, $node->web_group, $node->config_path, $node->backup_path, $node->restart_cmd, $node->drush_path, $node->vid);
  }
}