Skip to content
Snippets Groups Projects
Commit f63a2007 authored by chris's avatar chris
Browse files

event SEND_HEADERS

Event data an array of headers dokuwiki will send[1].
The default action is to output all the headers in order using the header() function.

This event is a full trigger, meaning there are three advises:
- SEND_HEADERS_before
- SEND_HEADERS
- SEND_HEADERS_after

Handlers of this event can add/modify/delete the headers in the event data. The event
data must remain an array, even if emptied.

[1] There is one dokuwiki header 'Content-Type: text/html; charset

darcs-hash:20060415160210-9b6ab-841bd034b797c7f1b8d4bbc66f90185a16e5a043.gz
parent a4b5ae12
No related branches found
No related tags found
No related merge requests found
......@@ -107,12 +107,19 @@ function act_dispatch(){
}
//call template FIXME: all needed vars available?
header('Content-Type: text/html; charset=utf-8');
$headers[] = 'Content-Type: text/html; charset=utf-8';
$evt = new event('SEND_HEADERS',$headers,act_sendheaders);
$evt->trigger();
include(template('main.php'));
// output for the commands is now handled in inc/templates.php
// in function tpl_content()
}
function act_sendheaders($headers) {
foreach ($headers as $hdr) header($hdr);
}
/**
* Sanitize the action command
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment