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

Defers SITEURL and dependencies until SQL loaded

This is the least intrusive solution I could come up with.

Anything else I tried to reduce technical debt would break the very
tangled dependency web, so I settled for this.

Fixes: #3033
This commit is contained in:
Deltik
2018-02-12 06:50:43 -06:00
parent de7fb1d1a0
commit d1a69b0c16
3 changed files with 199 additions and 186 deletions

9
thumb.php Normal file → Executable file
View File

@@ -149,9 +149,12 @@ class e_thumbpage
// basic Admin area detection - required for proper path parsing
define('ADMIN', strpos(e_SELF, ($e107->getFolder('admin')) !== false || strpos(e_PAGE, 'admin') !== false));
$e107->set_urls(false);
// Next function call maintains behavior identical to before; might not be needed
// See https://github.com/e107inc/e107/issues/3033
$e107->set_urls_deferred();
$pref = $e107->getPref(); //TODO optimize/benchmark
$this->_watermark = array(
'activate' => vartrue($pref['watermark_activate'], false),
'text' => vartrue($pref['watermark_text']),
@@ -493,4 +496,4 @@ class e_thumbpage
}
?>
?>