public static function DeliveryHelper::deliverRawHtmlPage in Helper 7
File
- lib/
DeliveryHelper.php, line 31
Class
Code
public static function deliverRawHtmlPage($result) {
if (is_int($result)) {
drupal_deliver_html_page($result);
return;
}
// Emit the correct charset HTTP header, but not if the page callback
// result is NULL, since that likely indicates that it printed something
// in which case, no further headers may be sent, and not if code running
// for this page request has already set the content type header.
if (isset($result) && is_null(drupal_get_http_header('Content-Type'))) {
drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
}
// Send appropriate HTTP-Header for browsers and search engines.
global $language;
drupal_add_http_header('Content-Language', $language->language);
if (isset($result)) {
print render($result);
}
drupal_page_footer();
}