Commit 0e2486ac authored by Adrian Rossouw's avatar Adrian Rossouw

make use of the variables we set up at install time to simplify code.

parent 4d1abec8
...@@ -237,12 +237,12 @@ function hosting_update_6008() { ...@@ -237,12 +237,12 @@ function hosting_update_6008() {
} }
// we want to enforce that the hostmaster site is always referred to as @hostmaster // we want to enforce that the hostmaster site is always referred to as @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'")); $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'"));
$records[$own_site] = 'hostmaster'; $records[$own_site] = 'hostmaster';
// We start with the web server because we assume that the main hostmaster site is installed locally. // 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_id = variable_get('hosting_own_web_server', 2);
db_query("UPDATE {node} SET title='localhost' WHERE nid=%d", $server_id); db_query("UPDATE {node} SET title='localhost' WHERE nid=%d", $server_id);
$records[$server_id] = 'server_localhost'; $records[$server_id] = 'server_localhost';
......
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