more zot6 basic stuff
This commit is contained in:
parent
66334374af
commit
d91a82430a
@ -61,6 +61,13 @@ class System {
|
|||||||
return 'pro';
|
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() {
|
static public function get_std_version() {
|
||||||
if(defined('STD_VERSION'))
|
if(defined('STD_VERSION'))
|
||||||
return STD_VERSION;
|
return STD_VERSION;
|
||||||
|
2
boot.php
2
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_SECONDARY', 0x0002); // All other mirror directory servers
|
||||||
define ( 'DIRECTORY_MODE_STANDALONE', 0x0100); // A detached (off the grid) hub with itself as directory server.
|
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
|
// We will look for upstream directories whenever me make contact
|
||||||
// with other sites, but if this is a new installation and isn't
|
// 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
|
// a standalone hub, we need to seed the service with a starting
|
||||||
|
@ -124,7 +124,7 @@ function zot_build_packet($channel, $type = 'notify', $recipients = null, $remot
|
|||||||
'sitekey' => get_config('system','pubkey')
|
'sitekey' => get_config('system','pubkey')
|
||||||
],
|
],
|
||||||
'callback' => '/post',
|
'callback' => '/post',
|
||||||
'version' => ZOT_REVISION,
|
'version' => Zotlabs\Lib\System::get_zot_revision(),
|
||||||
'encryption' => crypto_methods(),
|
'encryption' => crypto_methods(),
|
||||||
'signing' => signing_methods()
|
'signing' => signing_methods()
|
||||||
];
|
];
|
||||||
@ -2894,8 +2894,9 @@ function import_site($arr, $pubkey) {
|
|||||||
|
|
||||||
$site_flags = $site_directory;
|
$site_flags = $site_directory;
|
||||||
|
|
||||||
if(array_key_exists('zot',$arr) && ((float) $arr['zot']) >= 6.0)
|
if(array_key_exists('zot',$arr)) {
|
||||||
$site_flags = ($site_flags & ZOT6_COMPLIANT);
|
set_sconfig($arr['url'],'system','zot_version',$arr['zot']);
|
||||||
|
}
|
||||||
|
|
||||||
if($exists) {
|
if($exists) {
|
||||||
if(($siterecord['site_flags'] != $site_flags)
|
if(($siterecord['site_flags'] != $site_flags)
|
||||||
@ -4225,12 +4226,7 @@ function zot_site_info() {
|
|||||||
|
|
||||||
$ret['site']['encryption'] = crypto_methods();
|
$ret['site']['encryption'] = crypto_methods();
|
||||||
$ret['site']['signing'] = signing_methods();
|
$ret['site']['signing'] = signing_methods();
|
||||||
if(function_exists('zotvi_load')) {
|
$ret['site']['zot'] = Zotlabs\Lib\System::get_zot_revision();
|
||||||
$ret['site']['zot'] = '6.0';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$ret['site']['zot'] = ZOT_REVISION;
|
|
||||||
}
|
|
||||||
|
|
||||||
// hide detailed site information if you're off the grid
|
// hide detailed site information if you're off the grid
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user