From 16d0417b706f7be482d65eb8dbfdd5b85974acdb Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 22 Apr 2016 09:44:01 -0700 Subject: [PATCH] Third-party compatibility for forum shortcode vars. --- e107_handlers/shortcode_handler.php | 3 ++- e107_plugins/forum/forum_viewtopic.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/e107_handlers/shortcode_handler.php b/e107_handlers/shortcode_handler.php index 4ee0b9c8b..064e3ab88 100644 --- a/e107_handlers/shortcode_handler.php +++ b/e107_handlers/shortcode_handler.php @@ -1366,7 +1366,8 @@ class e_shortcode } /** - * Alias of setParserVars - Preferred use by Plugins. + * Alias of setParserVars - Preferred use by Plugins. + * Sets the value of $sc->var */ public function setVars($eVars) // Alias of setParserVars(); { diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 08b618b80..4d25d18a9 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -474,6 +474,7 @@ foreach ($postList as $postInfo) $alt = !$alt; $sc->setScVar('postInfo', $postInfo); + $sc->setVars($postInfo); // compatibility if($postInfo['post_status']) { @@ -493,6 +494,7 @@ foreach ($postList as $postInfo) { $postInfo['thread_start'] = true; $sc->setScVar('postInfo', $postInfo); + $sc->setVars($postInfo); // compatibility $sc->wrapper('forum_viewtopic/thread'); // $forum_shortcodes = e107::getScBatch('view', 'forum')->setScVar('postInfo', $postInfo)->wrapper('forum/viewtopic'); $forthr = $tp->parseTemplate($FORUMTHREADSTYLE, true, vartrue($sc)) . "\n";