aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-14 17:24:50 -0700
committerredmatrix <git@macgirvin.com>2016-05-14 17:24:50 -0700
commit0503b11840d170a7f22d0392d08677c19b663ac2 (patch)
tree98405ba7b56be1f77a268a2f57a2bf1ec3899242 /boot.php
parentb497faee27a89ff1a2da07d02dd6f6676183cc98 (diff)
downloadvolse-hubzilla-0503b11840d170a7f22d0392d08677c19b663ac2.tar.gz
volse-hubzilla-0503b11840d170a7f22d0392d08677c19b663ac2.tar.bz2
volse-hubzilla-0503b11840d170a7f22d0392d08677c19b663ac2.zip
allow addon autoloaders to specify absolute namespace classes starting with \
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index d5bde53ac..e90cd7c15 100755
--- a/boot.php
+++ b/boot.php
@@ -634,6 +634,8 @@ class ZotlabsAutoloader {
}
$arr = explode('\\',$className);
if($arr && count($arr) > 1) {
+ if(! $arr[0])
+ $arr = array_shift($arr);
$filename = 'addon/' . lcfirst($arr[0]) . '/' . ucfirst($arr[1]) . ((count($arr) === 2) ? '.php' : '/' . ucfirst($arr[2]) . ".php");
if (file_exists($filename)) {
include($filename);