aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-18 19:32:06 -0800
committerredmatrix <git@macgirvin.com>2016-02-18 19:32:06 -0800
commit5a7b994e59306519574ce7aaa004f08d7d47ee05 (patch)
tree85349e95d8cfaa7832fc0c698df179c0dd89094e
parent4512a4cdd4713117dabad607e74578af16306350 (diff)
downloadvolse-hubzilla-5a7b994e59306519574ce7aaa004f08d7d47ee05.tar.gz
volse-hubzilla-5a7b994e59306519574ce7aaa004f08d7d47ee05.tar.bz2
volse-hubzilla-5a7b994e59306519574ce7aaa004f08d7d47ee05.zip
siteinfo regression with Zotlabs\Project - add an autoloader
-rwxr-xr-xboot.php19
-rw-r--r--mod/siteinfo.php2
2 files changed, 19 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 29f1788b6..4f58c4139 100755
--- a/boot.php
+++ b/boot.php
@@ -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) {
diff --git a/mod/siteinfo.php b/mod/siteinfo.php
index 29c7d7d2c..19b566b73 100644
--- a/mod/siteinfo.php
+++ b/mod/siteinfo.php
@@ -15,7 +15,7 @@ function siteinfo_content(&$a) {
$version = sprintf( t('Version %s'), Zotlabs\Project\System::get_project_version());
if(@is_dir('.git') && function_exists('shell_exec')) {
$commit = @shell_exec('git log -1 --format="%h"');
- $tag = get_std_version(); // @shell_exec('git describe --tags --abbrev=0');
+ $tag = Zotlabs\Project\System::get_std_version(); // @shell_exec('git describe --tags --abbrev=0');
}
if(! isset($commit) || strlen($commit) > 16)
$commit = '';