You are here

function hosting_update_6010 in Hostmaster (Aegir) 6

Implements hook_update_N().

Add url aliases for the context names that are registered.

File

modules/hosting/hosting.install, line 289
Install, update and uninstall for the hosting module.

Code

function hosting_update_6010() {

  // We include the file instead of enabling the module,
  // because we do not want the overhead of having all the
  // path UI stuff on nodes.
  require_once "./modules/path/path.module";
  $ret = array();
  $result = db_query("SELECT nid, name FROM {hosting_context}");
  while ($obj = db_fetch_object($result)) {
    path_set_alias("node/{$obj->nid}", "hosting/c/{$obj->name}");
  }
  return $ret;
}