Commit 4d1abec8 authored by Adrian Rossouw's avatar Adrian Rossouw

avoid using node_save when giving out context names

parent e32136dc
......@@ -243,11 +243,9 @@ function hosting_update_6008() {
// We start with the web server because we assume that the main hostmaster site is installed locally.
$server_id = db_result(db_query("SELECT web_server FROM {hosting_platform} WHERE nid=%d", $own_platform));
$server = node_load($server_id);
$server->title = 'localhost';
db_query("UPDATE {node} SET title='localhost' WHERE nid=%d", $server_id);
$records[$server->nid] = 'server_localhost';
$records[$server_id] = 'server_localhost';
foreach ($records as $nid => $name) {
db_query("INSERT INTO {hosting_context} (nid, name) VALUES (%d, '%s')", $nid, $name);
......@@ -28,6 +28,7 @@ function drush_hosting_hostmaster_resume() {
drush_log(dt('Platform not found for path %path, adding platform node', array('%path' => $platform_root)));
// inherit settings from current platform node
$platform = node_load($node->platform);
$platform->type = 'platform';
$platform->publish_path = $platform_root;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment