Commit 0cac6939 authored by Steven Wittens's avatar Steven Wittens

- Fix usage of header() to drupal_set_header()

- Emit charset for blogapi RSD
parent cc9a372e
......@@ -257,7 +257,7 @@ function drupal_goto($path = '', $query = NULL, $fragment = NULL) {
* Generates a site offline message
*/
function drupal_site_offline() {
header('HTTP/1.0 503 Service unavailable');
drupal_set_header('HTTP/1.0 503 Service unavailable');
drupal_set_title(t('Site offline'));
print theme('maintenance_page', variable_get('site_offline_message',
t('%site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('%site' => variable_get('site_name', t('This drupal site'))))));
......@@ -267,7 +267,7 @@ function drupal_site_offline() {
* Generates a 404 error if the request can not be handled.
*/
function drupal_not_found() {
header('HTTP/1.0 404 Not Found');
drupal_set_header('HTTP/1.0 404 Not Found');
watchdog('page not found', t('%page not found.', array('%page' => theme('placeholder', $_GET['q']))), WATCHDOG_WARNING);
$path = drupal_get_normal_path(variable_get('site_404', ''));
......@@ -287,7 +287,7 @@ function drupal_not_found() {
* Generates a 403 error if the request is not allowed.
*/
function drupal_access_denied() {
header('HTTP/1.0 403 Forbidden');
drupal_set_header('HTTP/1.0 403 Forbidden');
watchdog('access denied', t('%page denied access.', array('%page' => theme('placeholder', $_GET['q']))), WATCHDOG_WARNING, l(t('view'), $_GET['q']));
$path = drupal_get_normal_path(variable_get('site_403', ''));
......
......@@ -600,7 +600,7 @@ function blogapi_rsd() {
$base = url('', NULL, NULL, TRUE);
$blogid = 1; # until we figure out how to handle multiple bloggers
header('Content-Type: application/rsd+xml');
drupal_set_header('Content-Type: application/rsd+xml; charset=utf-8');
print <<<__RSD__
<?xml version="1.0"?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
......
......@@ -600,7 +600,7 @@ function blogapi_rsd() {
$base = url('', NULL, NULL, TRUE);
$blogid = 1; # until we figure out how to handle multiple bloggers
header('Content-Type: application/rsd+xml');
drupal_set_header('Content-Type: application/rsd+xml; charset=utf-8');
print <<<__RSD__
<?xml version="1.0"?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
......
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