From 4e9938793d5bebeafb73caa36987ba91f7eef58d Mon Sep 17 00:00:00 2001 From: mohrt Date: Thu, 8 Mar 2001 20:19:34 +0000 Subject: [PATCH] missing _syntax_error function recovered. fixed minor syntax in docs --- Smarty.class.php | 9 +++++++++ docs.sgml | 2 +- libs/Smarty.class.php | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Smarty.class.php b/Smarty.class.php index 9001130b..27e5c80f 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -564,6 +564,15 @@ class Smarty return true; } +/*======================================================================*\ + Function: _syntax_error + Purpose: display Smarty syntax error +\*======================================================================*/ + function _syntax_error($error_msg, $error_type = E_USER_ERROR) + { + trigger_error("Smarty: [in " . $this->_current_file . " line " . + $this->_current_line_no . "]: syntax error: $error_msg", $error_type); + } } /* vim: set expandtab: */ diff --git a/docs.sgml b/docs.sgml index e20d3350..d90a9501 100644 --- a/docs.sgml +++ b/docs.sgml @@ -2338,7 +2338,7 @@ OUTPUT: {* $row_height = 10, $row_width = 20, #col_div# = 2, assigned in template *} -{math equation="height * padding / division" +{math equation="height * width / division" height=$row_height width=$row_width division=#col_div#} diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 9001130b..27e5c80f 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -564,6 +564,15 @@ class Smarty return true; } +/*======================================================================*\ + Function: _syntax_error + Purpose: display Smarty syntax error +\*======================================================================*/ + function _syntax_error($error_msg, $error_type = E_USER_ERROR) + { + trigger_error("Smarty: [in " . $this->_current_file . " line " . + $this->_current_line_no . "]: syntax error: $error_msg", $error_type); + } } /* vim: set expandtab: */