From e1cf1e70a9fecf74a2a416e5d64c37aef982ec35 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 2 Aug 2018 14:22:18 -0700 Subject: [PATCH] Fixes #3329 PHP7 on BBcode renderButtons() --- e107_handlers/bbcode_handler.php | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/e107_handlers/bbcode_handler.php b/e107_handlers/bbcode_handler.php index 5ae2c6049..199f82a9d 100644 --- a/e107_handlers/bbcode_handler.php +++ b/e107_handlers/bbcode_handler.php @@ -525,11 +525,30 @@ class e_bbcode - // NEW bbcode button rendering function. replacing displayHelp(); - function renderButtons($template, $id='', $options=array()) + // + + /** + * NEW bbcode button rendering function. replacing displayHelp(); + * @param string (optional) $template eg. news, submitnews, extended, admin, mailout, page, comment, signature + * @param string $id + * @param array $options + * @return string + */ + function renderButtons($template='', $id='', $options=array()) { $tp = e107::getParser(); + + // Notice Removal + $BBCODE_TEMPLATE_SUBMITNEWS = ''; + $BBCODE_TEMPLATE_NEWSPOST = ''; + $BBCODE_TEMPLATE_MAILOUT = ''; + $BBCODE_TEMPLATE_CPAGE = ''; + $BBCODE_TEMPLATE_ADMIN = ''; + $BBCODE_TEMPLATE_COMMENT = ''; + $BBCODE_TEMPLATE_SIGNATURE = ''; + + require(e107::coreTemplatePath('bbcode')); //correct way to load a core template. $pref = e107::getPref('e_bb_list'); @@ -569,10 +588,10 @@ class e_bbcode { $BBCODE_TEMPLATE = $BBCODE_TEMPLATE_ADMIN; } - else // Front-end - { - $BBCODE_TEMPLATE = $BBCODE_TEMPLATE; - } + // else // Front-end + // { + // $BBCODE_TEMPLATE = $BBCODE_TEMPLATE; + // } $bbcode_shortcodes = e107::getScBatch('bbcode');