mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
- implemented $smarty.block.name.parent to access parent block content
- fixed smarty.class
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
03/26/2009
|
||||
- fixed parser not to create error on `word` in double quoted strings
|
||||
- allow PHP array(...)
|
||||
- implemented $smarty.block.name.parent to access parent block content
|
||||
- fixed smarty.class
|
||||
|
||||
|
||||
03/23/2009
|
||||
- fixed {foreachelse} and {forelse} tags
|
||||
|
@@ -406,7 +406,7 @@ class Smarty extends Smarty_Internal_TemplateBase {
|
||||
* @param string $code the error code
|
||||
*/
|
||||
class SmartyException {
|
||||
public function printException($e)
|
||||
public static function printException($e)
|
||||
{
|
||||
echo "Code: " . $e->getCode() . "<br />Error: " . htmlentities($e->getMessage()) . "<br />"
|
||||
. "File: " . $e->getFile() . "<br />"
|
||||
|
@@ -83,7 +83,11 @@ class Smarty_Internal_Compile_Smarty extends Smarty_Internal_CompileBase {
|
||||
case 'global':
|
||||
return "\$_smarty_tpl->smarty->getGlobalVariable($_index[1])->value";
|
||||
case 'block':
|
||||
return "'".addcslashes($compiler->template->block_data[trim($_index[1],"'")]['source'],"'")."'";
|
||||
if ($_index[2] == '\'parent\'') {
|
||||
return "'" . addcslashes($compiler->template->block_data[trim($_index[1], "'")]['source'], "'") . "'";
|
||||
} else {
|
||||
return "''";
|
||||
}
|
||||
case 'ldelim':
|
||||
$_ldelim = $this->smarty->left_delimiter;
|
||||
return "'$_ldelim'";
|
||||
|
Reference in New Issue
Block a user