Release diogenes-0.9.22
[diogenes.git] / plugins / HttpHeader.php
index ec9dba4..9c89fb4 100644 (file)
@@ -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;
   }