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; } -} - -?> +} + +?>