You are here

function hosting_web_server_update_6002 in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 web_server/hosting_web_server.install \hosting_web_server_update_6002()
  2. 7.3 web_server/hosting_web_server.install \hosting_web_server_update_6002()

Drop the web_server table as it is no longer needed.. Move the restart command value into it's new home in the service table.

File

web_server/hosting_web_server.install, line 55

Code

function hosting_web_server_update_6002() {
  $ret = array();
  $result = db_query("SELECT * FROM {hosting_web_server}");
  while ($obj = db_fetch_object($result)) {
    db_query("UPDATE {hosting_service} SET restart_cmd = '%s', port = 80 WHERE nid=%d AND service='http' AND type = 'apache'", $obj->restart_cmd, $obj->nid);
  }
  db_drop_table($ret, 'hosting_web_server');
  return $ret;
}