diff options
author | redmatrix <git@macgirvin.com> | 2016-02-18 19:32:06 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-02-18 19:32:06 -0800 |
commit | 5a7b994e59306519574ce7aaa004f08d7d47ee05 (patch) | |
tree | 85349e95d8cfaa7832fc0c698df179c0dd89094e /boot.php | |
parent | 4512a4cdd4713117dabad607e74578af16306350 (diff) | |
download | volse-hubzilla-5a7b994e59306519574ce7aaa004f08d7d47ee05.tar.gz volse-hubzilla-5a7b994e59306519574ce7aaa004f08d7d47ee05.tar.bz2 volse-hubzilla-5a7b994e59306519574ce7aaa004f08d7d47ee05.zip |
siteinfo regression with Zotlabs\Project - add an autoloader
Diffstat (limited to 'boot.php')
-rwxr-xr-x | boot.php | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -45,7 +45,6 @@ require_once('include/Contact.php'); require_once('include/account.php'); require_once('include/AccessList.php'); -require_once('Zotlabs/Project/System.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc'))); @@ -625,6 +624,21 @@ function startup() { } } + +class ZotlabsAutoloader { + static public function loader($className) { + $filename = str_replace('\\', '/', $className) . ".php"; + if (file_exists($filename)) { + include($filename); + if (class_exists($className)) { + return TRUE; + } + } + return FALSE; + } +} + + /** * class: App * @@ -855,6 +869,9 @@ class App { $this->register_template_engine($k); } } + + spl_autoload_register('ZotlabsAutoloader::loader'); + } function get_baseurl($ssl = false) { |