mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
Issue #4124 - Avoid legacy globals with v2.x theme templates.
This commit is contained in:
@@ -61,7 +61,7 @@ class comment
|
|||||||
|
|
||||||
global $COMMENTSTYLE;
|
global $COMMENTSTYLE;
|
||||||
|
|
||||||
if (!$COMMENTSTYLE)
|
if (empty($COMMENTSTYLE) || !deftrue('THEME_LEGACY')) // v2.x
|
||||||
{
|
{
|
||||||
require(e107::coreTemplatePath('comment')); // using require_once() could cause an empty template if the template is already loaded, for example, by the comment-menu al
|
require(e107::coreTemplatePath('comment')); // using require_once() could cause an empty template if the template is already loaded, for example, by the comment-menu al
|
||||||
}
|
}
|
||||||
|
@@ -1197,12 +1197,11 @@ class news_front
|
|||||||
$caption = null;
|
$caption = null;
|
||||||
$render = false;
|
$render = false;
|
||||||
|
|
||||||
if(!empty($NEWSSTYLE))
|
if(deftrue('THEME_LEGACY') && !empty($NEWSSTYLE))
|
||||||
{
|
{
|
||||||
$template = $NEWSSTYLE;
|
$template = $NEWSSTYLE;
|
||||||
|
|
||||||
}
|
}
|
||||||
elseif(function_exists("news_style")) // BC
|
elseif(deftrue('THEME_LEGACY') && function_exists("news_style")) // BC
|
||||||
{
|
{
|
||||||
$template = news_style($news, 'extend', $param);
|
$template = news_style($news, 'extend', $param);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user