1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-29 02:40:25 +02:00

Third-party compatibility for forum shortcode vars.

This commit is contained in:
Cameron
2016-04-22 09:44:01 -07:00
parent 9cf18a2708
commit 16d0417b70
2 changed files with 4 additions and 1 deletions

View File

@@ -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(); public function setVars($eVars) // Alias of setParserVars();
{ {

View File

@@ -474,6 +474,7 @@ foreach ($postList as $postInfo)
$alt = !$alt; $alt = !$alt;
$sc->setScVar('postInfo', $postInfo); $sc->setScVar('postInfo', $postInfo);
$sc->setVars($postInfo); // compatibility
if($postInfo['post_status']) if($postInfo['post_status'])
{ {
@@ -493,6 +494,7 @@ foreach ($postList as $postInfo)
{ {
$postInfo['thread_start'] = true; $postInfo['thread_start'] = true;
$sc->setScVar('postInfo', $postInfo); $sc->setScVar('postInfo', $postInfo);
$sc->setVars($postInfo); // compatibility
$sc->wrapper('forum_viewtopic/thread'); $sc->wrapper('forum_viewtopic/thread');
// $forum_shortcodes = e107::getScBatch('view', 'forum')->setScVar('postInfo', $postInfo)->wrapper('forum/viewtopic'); // $forum_shortcodes = e107::getScBatch('view', 'forum')->setScVar('postInfo', $postInfo)->wrapper('forum/viewtopic');
$forthr = $tp->parseTemplate($FORUMTHREADSTYLE, true, vartrue($sc)) . "\n"; $forthr = $tp->parseTemplate($FORUMTHREADSTYLE, true, vartrue($sc)) . "\n";