From 951cefec27e2090e13e22e3433939ca632e306f9 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 4 May 2020 11:15:00 -0700 Subject: [PATCH] Fixes #4153 - load theme class sooner. --- class2.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/class2.php b/class2.php index 85579b5ea..6b348331f 100755 --- a/class2.php +++ b/class2.php @@ -960,10 +960,12 @@ if (!class_exists('e107table', false)) private $thm; - function __construct() + public function init() { $this->legacyThemeClass = e107::getPref('sitetheme')."_theme"; // disabled at the moment. $this->adminThemeClass = e107::getPref('admintheme')."_admintheme"; // Check for a class. + + $this->load(); } /** @@ -1242,7 +1244,7 @@ if (!class_exists('e107table', false)) private function tablestyle($caption, $text, $mode) { - $this->load(); + // Automatic list detection . $isList = (strpos(ltrim($text), 'ns caught by __get() -$ns = e107::getRender(); //TODO - find & replace $ns, $e107->ns +$ns = e107::getRender(); // load theme class. // EONE-134 - bad e_module could destroy e107 instance $e107 = e107::getInstance(); // Is this needed now? @@ -1576,6 +1578,7 @@ else } } +e107::getRender()->init(); // initialize theme class. //---------------------------- // Load shortcode handler