From 042471b4a00ee3346724a66dadb23042f54810f4 Mon Sep 17 00:00:00 2001 From: Kevin Andrews Date: Tue, 29 Jul 2014 13:31:22 +0100 Subject: [PATCH] registered our autoloader in spl to prevent it being overridden by phpmailerautoload method. --- dryden/loader.inc.php | 54 ++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/dryden/loader.inc.php b/dryden/loader.inc.php index a0fc7756d..df575bd11 100644 --- a/dryden/loader.inc.php +++ b/dryden/loader.inc.php @@ -1,26 +1,28 @@ - core - * @author Bobby Allen (ballen@zpanelcp.com) - * @copyright ZPanel Project (http://www.zpanelcp.com/) - * @link http://www.zpanelcp.com/ - * @license GPL (http://www.gnu.org/licenses/gpl.html) - */ -global $starttime; -$mtime = explode(' ', microtime()); -$mtime = $mtime[1] + $mtime[0]; -$starttime = $mtime; - -function __autoload($class_name) { - $path = 'dryden/' . str_replace('_', '/', $class_name) . '.class.php'; - if (file_exists($path)) { - require_once $path; - } -} - + core + * @author Bobby Allen (ballen@zpanelcp.com) + * @copyright ZPanel Project (http://www.zpanelcp.com/) + * @link http://www.zpanelcp.com/ + * @license GPL (http://www.gnu.org/licenses/gpl.html) + */ +global $starttime; +$mtime = explode(' ', microtime()); +$mtime = $mtime[1] + $mtime[0]; +$starttime = $mtime; + +function __autoload($class_name) { + $path = 'dryden/' . str_replace('_', '/', $class_name) . '.class.php'; + if (file_exists($path)) { + require_once $path; + } +} + +spl_autoload_register('__autoload'); + if (isset($_GET['module'])) { $CleanModuleName = fs_protector::SanitiseFolderName($_GET['module']); @@ -33,6 +35,6 @@ function __autoload($class_name) { if (file_exists($ModulePath)) { require_once $ModulePath; } -} - -?> +} + +?>