diff options
| author | spiderr <spider@viovio.com> | 2013-04-12 15:40:32 -0400 |
|---|---|---|
| committer | spiderr <spider@viovio.com> | 2013-04-12 15:40:32 -0400 |
| commit | 7457eb8886e75281aef1da4f93edd8d49e29df50 (patch) | |
| tree | 03114ec952fe4dd0623e0308cedb795d6fd8900e | |
| parent | efaea33bc136cde65af7be3f34e4460d948dadb1 (diff) | |
| download | themes-7457eb8886e75281aef1da4f93edd8d49e29df50.tar.gz themes-7457eb8886e75281aef1da4f93edd8d49e29df50.tar.bz2 themes-7457eb8886e75281aef1da4f93edd8d49e29df50.zip | |
fix comment display crashing - passed variable was quoted
| -rw-r--r-- | smartyplugins/function.displaycomment.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/smartyplugins/function.displaycomment.php b/smartyplugins/function.displaycomment.php index e338117..0ae4618 100644 --- a/smartyplugins/function.displaycomment.php +++ b/smartyplugins/function.displaycomment.php @@ -8,18 +8,19 @@ /** * smarty_function_displaycomment */ -function smarty_function_displaycomment($params) { - global $gBitSmarty; +function smarty_function_displaycomment( $pParams, &$pSmarty ) { - if (!empty($params['comment'])) { - $comment = $params['comment']; - $gBitSmarty->assign('comment', $comment); - if (empty($params['template'])) { - $gBitSmarty->display('bitpackage:liberty/display_comment.tpl'); + if (!empty($pParams['comment'])) { + $comment = $pParams['comment']; + $pSmarty->assign('comment', $comment); + if (empty($pParams['template'])) { + $ret = $pSmarty->fetch('bitpackage:liberty/display_comment.tpl'); } else { - $gBitSmarty->display($params['template']); + $ret = $pSmarty->fetch($pParams['template']); } } + + return $ret; } ?> |
