function hosting_web_server_update_6002 in Hosting 7.4
Same name and namespace in other branches
- 6.2 web_server/hosting_web_server.install \hosting_web_server_update_6002()
- 7.3 web_server/hosting_web_server.install \hosting_web_server_update_6002()
Implements hook_update_N().
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 73 - Update functions for the hosting_web_server module.
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;
}