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

Fixes #4624 - Fall back to require() when loading legacy template if require_once() returns nothing (likely due to third-party plugin) or theme.

This commit is contained in:
Cameron 2021-11-30 11:00:17 -08:00
parent 0fd30744a2
commit b0c3c9cd17

View File

@ -97,11 +97,21 @@ if($template = e107::getCoreTemplate('signup'))
} }
else else
{ {
require_once(e107::coreTemplatePath('signup')); //correct way to load a core template. $SIGNUP_EXTENDED_USER_FIELDS = '';
$SIGNUP_EXTENDED_CAT = '';
$tmplPath = e107::coreTemplatePath('signup');
require_once($tmplPath); //correct way to load a core template.
if(empty($SIGNUP_BODY) && empty($SIGNUP_BEGIN)) // fall-back in case the template has been loaded before.
{
require($tmplPath);
}
$template = array( $template = array(
'extended-user-fields' => $SIGNUP_EXTENDED_USER_FIELDS, 'extended-user-fields' => $SIGNUP_EXTENDED_USER_FIELDS,
'extended-category' => $SIGNUP_EXTENDED_CAT 'extended-category' => $SIGNUP_EXTENDED_CAT
); );
unset($tmplPath);
} }
$signup_shortcodes = e107::getScBatch('signup'); $signup_shortcodes = e107::getScBatch('signup');