summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spider@viovio.com>2013-04-12 15:40:32 -0400
committerspiderr <spider@viovio.com>2013-04-12 15:40:32 -0400
commit7457eb8886e75281aef1da4f93edd8d49e29df50 (patch)
tree03114ec952fe4dd0623e0308cedb795d6fd8900e
parentefaea33bc136cde65af7be3f34e4460d948dadb1 (diff)
downloadthemes-7457eb8886e75281aef1da4f93edd8d49e29df50.tar.gz
themes-7457eb8886e75281aef1da4f93edd8d49e29df50.tar.bz2
themes-7457eb8886e75281aef1da4f93edd8d49e29df50.zip
fix comment display crashing - passed variable was quoted
-rw-r--r--smartyplugins/function.displaycomment.php17
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;
}
?>