Commit e32136dc authored by Adrian Rossouw's avatar Adrian Rossouw

Enforce the localhost setting of the server node more strictly. breaks upgrades otherwise.

parent 3d433d8f
......@@ -237,13 +237,13 @@ function hosting_update_6008() {
}
// we want to enforce that the hostmaster site is always referred to as @hostmaster
$own_site = db_result(db_query("SELECT s.nid FROM {hosting_site} s LEFT JOIN {hosting_package} p ON s.profile=p.nid WHERE p.short_name='hostmaster'"));
list($own_site, $own_platform) = db_fetch_array(db_query("SELECT s.nid, s.platform FROM {hosting_site} s LEFT JOIN {hosting_package} p ON s.profile=p.nid WHERE p.short_name='hostmaster'"));
$records[$own_site] = 'hostmaster';
// We start with the web server because we assume that the main hostmaster site is installed locally.
$node = node_load($own_site);
$server = node_load($node->web_server);
$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';
node_save($server);
......
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