Commit 08121110 authored by Adrian Rossouw's avatar Adrian Rossouw

Use the hosting_name for the context if it has been supplied on node creation.

parent 3d59dedd
......@@ -276,7 +276,8 @@ function hosting_server_update($node) {
*/
function hosting_server_insert($node) {
if (!$node->old_vid) {
hosting_context_register($node->nid, 'server_' . preg_replace("/[!\W\.\-]/", "", $node->title));
$hosting_name = ($node->hosting_name) ? $node->hosting_name : 'server_' . preg_replace("/[!\W\.\-]/", "", $node->title);
hosting_context_register($node->nid, $hosting_name );
}
db_query("INSERT INTO {hosting_server} (vid, nid)
......
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