function hosting_js_page in Hostmaster (Aegir) 6
Page callback for a page to be rendered in modal frame.
1 string reference to 'hosting_js_page'
- hosting_menu in modules/
hosting/ hosting.module - Implementation of hook_menu().
File
- modules/
hosting/ hosting.module, line 97 - Hosting module.
Code
function hosting_js_page() {
modalframe_child_js();
$args = func_get_args();
$path = implode('/', $args);
menu_set_active_item($path);
# $_SERVER['REQUEST_URI'] = str_replace('/hosting/js', '', $_SERVER['REQUEST_URI']);
if ($router_item = menu_get_item($path)) {
if ($router_item['access']) {
if ($router_item['file']) {
require_once $router_item['file'];
}
$return = call_user_func_array($router_item['page_callback'], $router_item['page_arguments']);
}
else {
$return = drupal_access_denied();
}
}
// Menu status constants are integers; page content is a string.
if (is_int($return)) {
modalframe_close_dialog();
}
return $return;
}