diff --git a/docs/060_inline_mode.php b/docs/060_inline_mode.php index 2ecfa02..3e6dbbb 100644 --- a/docs/060_inline_mode.php +++ b/docs/060_inline_mode.php @@ -12,7 +12,7 @@ $s->assign("name", "Jason Doolis"); $s->assign("turtles", ["Michelangeo", "Donatello", "Leonardo", "Raphael"]); -print $s->fetch("INLINE"); +print $s->fetch(SLUZ_INLINE); //////////////////////////////////////////////////// diff --git a/sluz.class.php b/sluz.class.php index 47966e0..b4cdd3d 100644 --- a/sluz.class.php +++ b/sluz.class.php @@ -2,6 +2,8 @@ //////////////////////////////////////////////////////// +define('SLUZ_INLINE', 987123654); // Just a random number + class sluz { public $version = '0.6'; public $tpl_file = null; @@ -192,7 +194,7 @@ public function fetch($tpl_file = "") { // If we're in simple mode and we have a __halt_compiler() we can assume inline mode $inline_simple = $this->simple_mode && !$tpl_file && $this->get_inline_content($this->php_file); - if ($tpl_file === "INLINE" || $inline_simple) { + if ($tpl_file === SLUZ_INLINE || $inline_simple) { $str = $this->get_inline_content($this->php_file); } elseif (!is_readable($tf)) { $this->error_out("Unable to load template file $tf",42280);