From ef1b03a830e3f045e179a26c7bc953e1cf4d471b Mon Sep 17 00:00:00 2001
From: Spring Pierre <pierre.spring@liip.ch>
Date: Thu, 17 Jan 2008 23:26:48 +0100
Subject: [PATCH] UNDO: remove htmlok and phpok tests from Doku_Handler

there is no necessity for the "htmlok"
and "phpok" testing in the Doku_Handler, taken the fact that the page
renderer does it too. and it gives the possibility to the renderer to
choose, what to do with such blocks.

darcs-hash:20080117222648-01292-c4b5a890ada5e5e962ba7e3f62c4c2fc5d72138f.gz
---
 inc/parser/handler.php | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index f021691ab..740ccea04 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -268,7 +268,11 @@ class Doku_Handler {
     function php($match, $state, $pos) {
         global $conf;
         if ( $state == DOKU_LEXER_UNMATCHED ) {
-            $this->_addCall('php',array($match), $pos);
+            if ($conf['phpok']) {
+                $this->_addCall('php',array($match), $pos);
+            } else {
+                $this->_addCall('file',array($match), $pos);
+            }
         }
         return true;
     }
@@ -288,7 +292,11 @@ class Doku_Handler {
     function html($match, $state, $pos) {
         global $conf;
         if ( $state == DOKU_LEXER_UNMATCHED ) {
-            $this->_addCall('html',array($match), $pos);
+            if($conf['htmlok']){
+                $this->_addCall('html',array($match), $pos);
+            } else {
+                $this->_addCall('file',array($match), $pos);
+            }
         }
         return true;
     }
-- 
GitLab