aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-25 20:11:21 -0700
committerzotlabs <mike@macgirvin.com>2017-09-25 20:11:21 -0700
commitd91a82430ad4ea9def4f0c033df4be34cb26d42e (patch)
tree1258b7f7c0483fc19234f62e6640c7efb6683a95
parent66334374af2a19fb76383028975724b9eda03cf2 (diff)
downloadvolse-hubzilla-d91a82430ad4ea9def4f0c033df4be34cb26d42e.tar.gz
volse-hubzilla-d91a82430ad4ea9def4f0c033df4be34cb26d42e.tar.bz2
volse-hubzilla-d91a82430ad4ea9def4f0c033df4be34cb26d42e.zip
more zot6 basic stuff
-rw-r--r--Zotlabs/Lib/System.php7
-rwxr-xr-xboot.php2
-rw-r--r--include/zot.php14
3 files changed, 12 insertions, 11 deletions
diff --git a/Zotlabs/Lib/System.php b/Zotlabs/Lib/System.php
index a5790fb07..8b4d7258a 100644
--- a/Zotlabs/Lib/System.php
+++ b/Zotlabs/Lib/System.php
@@ -61,6 +61,13 @@ class System {
return 'pro';
}
+
+ static public function get_zot_revision() {
+ $x = [ 'revision' => ZOT_REVISION ];
+ call_hooks('zot_revision',$x)
+ return $x['revision'];
+ }
+
static public function get_std_version() {
if(defined('STD_VERSION'))
return STD_VERSION;
diff --git a/boot.php b/boot.php
index df5c77e43..e0ffb050c 100755
--- a/boot.php
+++ b/boot.php
@@ -72,8 +72,6 @@ define ( 'DIRECTORY_MODE_PRIMARY', 0x0001); // There can only be *one* prima
define ( 'DIRECTORY_MODE_SECONDARY', 0x0002); // All other mirror directory servers
define ( 'DIRECTORY_MODE_STANDALONE', 0x0100); // A detached (off the grid) hub with itself as directory server.
-define ( 'ZOT6_COMPLIANT', 0x1000);
-
// We will look for upstream directories whenever me make contact
// with other sites, but if this is a new installation and isn't
// a standalone hub, we need to seed the service with a starting
diff --git a/include/zot.php b/include/zot.php
index a9ec95baa..af7fbf8fd 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -124,7 +124,7 @@ function zot_build_packet($channel, $type = 'notify', $recipients = null, $remot
'sitekey' => get_config('system','pubkey')
],
'callback' => '/post',
- 'version' => ZOT_REVISION,
+ 'version' => Zotlabs\Lib\System::get_zot_revision(),
'encryption' => crypto_methods(),
'signing' => signing_methods()
];
@@ -2894,8 +2894,9 @@ function import_site($arr, $pubkey) {
$site_flags = $site_directory;
- if(array_key_exists('zot',$arr) && ((float) $arr['zot']) >= 6.0)
- $site_flags = ($site_flags & ZOT6_COMPLIANT);
+ if(array_key_exists('zot',$arr)) {
+ set_sconfig($arr['url'],'system','zot_version',$arr['zot']);
+ }
if($exists) {
if(($siterecord['site_flags'] != $site_flags)
@@ -4225,12 +4226,7 @@ function zot_site_info() {
$ret['site']['encryption'] = crypto_methods();
$ret['site']['signing'] = signing_methods();
- if(function_exists('zotvi_load')) {
- $ret['site']['zot'] = '6.0';
- }
- else {
- $ret['site']['zot'] = ZOT_REVISION;
- }
+ $ret['site']['zot'] = Zotlabs\Lib\System::get_zot_revision();
// hide detailed site information if you're off the grid