1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 04:10:38 +02:00

Fixes #3329 PHP7 on BBcode renderButtons()

This commit is contained in:
Cameron
2018-08-02 14:22:18 -07:00
parent 367498b598
commit e1cf1e70a9

View File

@@ -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(); $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. require(e107::coreTemplatePath('bbcode')); //correct way to load a core template.
$pref = e107::getPref('e_bb_list'); $pref = e107::getPref('e_bb_list');
@@ -569,10 +588,10 @@ class e_bbcode
{ {
$BBCODE_TEMPLATE = $BBCODE_TEMPLATE_ADMIN; $BBCODE_TEMPLATE = $BBCODE_TEMPLATE_ADMIN;
} }
else // Front-end // else // Front-end
{ // {
$BBCODE_TEMPLATE = $BBCODE_TEMPLATE; // $BBCODE_TEMPLATE = $BBCODE_TEMPLATE;
} // }
$bbcode_shortcodes = e107::getScBatch('bbcode'); $bbcode_shortcodes = e107::getScBatch('bbcode');