[pLog-svn] r3697 - in plog/trunk/class/template/smarty: . plugins
mark at devel.lifetype.net
mark at devel.lifetype.net
Thu Jul 6 09:49:27 GMT 2006
Author: mark
Date: 2006-07-06 09:49:25 +0000 (Thu, 06 Jul 2006)
New Revision: 3697
Modified:
plog/trunk/class/template/smarty/Config_File.class.php
plog/trunk/class/template/smarty/Smarty.class.php
plog/trunk/class/template/smarty/Smarty_Compiler.class.php
plog/trunk/class/template/smarty/plugins/function.html_select_date.php
plog/trunk/class/template/smarty/plugins/modifier.regex_replace.php
Log:
Upgrade smarty to 2.6.14
Modified: plog/trunk/class/template/smarty/Config_File.class.php
===================================================================
--- plog/trunk/class/template/smarty/Config_File.class.php 2006-07-05 22:18:01 UTC (rev 3696)
+++ plog/trunk/class/template/smarty/Config_File.class.php 2006-07-06 09:49:25 UTC (rev 3697)
@@ -18,14 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://smarty.php.net/
- * @version 2.6.12
+ * @version 2.6.14
* @copyright Copyright: 2001-2005 New Digital Group, Inc.
* @author Andrei Zmievski <andrei at php.net>
* @access public
* @package Smarty
*/
-/* $Id: Config_File.class.php,v 1.83 2005/12/14 14:53:55 mohrt Exp $ */
+/* $Id: Config_File.class.php,v 1.84 2006/01/18 19:02:52 mohrt Exp $ */
/**
* Config file reading class
Modified: plog/trunk/class/template/smarty/Smarty.class.php
===================================================================
--- plog/trunk/class/template/smarty/Smarty.class.php 2006-07-05 22:18:01 UTC (rev 3696)
+++ plog/trunk/class/template/smarty/Smarty.class.php 2006-07-06 09:49:25 UTC (rev 3697)
@@ -27,10 +27,10 @@
* @author Monte Ohrt <monte at ohrt dot com>
* @author Andrei Zmievski <andrei at php.net>
* @package Smarty
- * @version 2.6.12
+ * @version 2.6.14
*/
-/* $Id: Smarty.class.php,v 1.523 2005/12/31 19:17:04 messju Exp $ */
+/* $Id: Smarty.class.php,v 1.524 2006/01/18 19:02:52 mohrt Exp $ */
/**
* DIR_SEP isn't used anymore, but third party apps might
@@ -464,7 +464,7 @@
*
* @var string
*/
- var $_version = '2.6.12';
+ var $_version = '2.6.14';
/**
* current template inclusion depth
Modified: plog/trunk/class/template/smarty/Smarty_Compiler.class.php
===================================================================
--- plog/trunk/class/template/smarty/Smarty_Compiler.class.php 2006-07-05 22:18:01 UTC (rev 3696)
+++ plog/trunk/class/template/smarty/Smarty_Compiler.class.php 2006-07-06 09:49:25 UTC (rev 3697)
@@ -21,12 +21,12 @@
* @link http://smarty.php.net/
* @author Monte Ohrt <monte at ohrt dot com>
* @author Andrei Zmievski <andrei at php.net>
- * @version 2.6.12
+ * @version 2.6.14
* @copyright 2001-2005 New Digital Group, Inc.
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.376 2006/01/15 19:29:45 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.381 2006/05/25 14:46:18 boots Exp $ */
/**
* Template compiling class
@@ -240,6 +240,9 @@
$ldq = preg_quote($this->left_delimiter, '~');
$rdq = preg_quote($this->right_delimiter, '~');
+ /* un-hide hidden xml open tags */
+ $source_content = preg_replace("~<({$ldq}(.*?){$rdq})[?]~s", '< \\1', $source_content);
+
// run template source through prefilter functions
if (count($this->_plugins['prefilter']) > 0) {
foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) {
@@ -880,9 +883,9 @@
$prefix .= "while (\$_block_repeat) { ob_start();";
$return = null;
$postfix = '';
- } else {
- $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); ";
- $return = "\$_block_repeat=false; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)";
+ } else {
+ $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;";
+ $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)";
$postfix = "} array_pop(\$this->_tag_stack);";
}
} else {
@@ -1253,7 +1256,7 @@
$tokens = $match[0];
if(empty($tokens)) {
- $_error_msg .= $elseif ? "'elseif'" : "'if'";
+ $_error_msg = $elseif ? "'elseif'" : "'if'";
$_error_msg .= ' statement requires arguments';
$this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__);
}
Modified: plog/trunk/class/template/smarty/plugins/function.html_select_date.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/function.html_select_date.php 2006-07-05 22:18:01 UTC (rev 3696)
+++ plog/trunk/class/template/smarty/plugins/function.html_select_date.php 2006-07-06 09:49:25 UTC (rev 3697)
@@ -22,7 +22,7 @@
* month values (Gary Loescher)
* - 1.3.1 added support for choosing format for
* day values (Marcus Bointon)
- * - 1.3.2 suppport negative timestamps, force year
+ * - 1.3.2 support negative timestamps, force year
* dropdown to include given date unless explicitly set (Monte)
* @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
* (Smarty online manual)
Modified: plog/trunk/class/template/smarty/plugins/modifier.regex_replace.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/modifier.regex_replace.php 2006-07-05 22:18:01 UTC (rev 3696)
+++ plog/trunk/class/template/smarty/plugins/modifier.regex_replace.php 2006-07-06 09:49:25 UTC (rev 3697)
@@ -11,7 +11,7 @@
*
* Type: modifier<br>
* Name: regex_replace<br>
- * Purpose: regular epxression search/replace
+ * Purpose: regular expression search/replace
* @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
* regex_replace (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
@@ -22,10 +22,11 @@
*/
function smarty_modifier_regex_replace($string, $search, $replace)
{
- if (preg_match('!\W(\w+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
+ if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
/* remove eval-modifier from $search */
- $search = substr($search, 0, -strlen($match[1])) . str_replace('e', '', $match[1]);
+ $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
}
+
return preg_replace($search, $replace, $string);
}
More information about the pLog-svn
mailing list