X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2FHttpHeader.php;h=9c89fb4d600d4361661a4949ed82243bfd27a1c6;hb=f3a0e7f138048b6d78f2a659754437870f75e0fc;hp=ec9dba43e247d1399924e1921441ab36bf4f5fb0;hpb=b2c16bf312cd037e252e568974a5523407e42099;p=diogenes.git diff --git a/plugins/HttpHeader.php b/plugins/HttpHeader.php index ec9dba4..9c89fb4 100644 --- a/plugins/HttpHeader.php +++ b/plugins/HttpHeader.php @@ -31,14 +31,8 @@ class HttpHeader extends Diogenes_Plugin_Filter /** Plugin description */ var $description = "This plugin allows you to add an HTTP header to a page."; - - /** Constructor. - */ - function HttpHeader() - { - $this->declareParam('contents', ''); - } - + /** Plugin parameters */ + var $params = array('contents' => ''); /** Apply filtering to the input and return an output. * @@ -46,11 +40,13 @@ class HttpHeader extends Diogenes_Plugin_Filter */ function filter($input) { - $header = $this->getParamValue('contents'); + $header = $this->params['contents']; + if ($header) { header($header); } + return $input; }