Merge branch 'dev' of /home/macgirvin/z into dev

This commit is contained in:
nobody 2021-10-28 15:15:35 -07:00
commit 84f77b8d19
2 changed files with 29 additions and 19 deletions

View file

@ -57,28 +57,38 @@ class Apps {
}
static public function get_base_apps() {
$x = get_config('system','base_apps',[
'Channel Home',
'Connections',
'Directory',
'Events',
'Files',
'Help',
'Lists',
'Photos',
'Profile Photo',
'Search',
'Settings',
'Stream',
'Suggest Channels',
'View Profile'
]);
if (file_exists('cache/default_apps')) {
$default_apps = file('cache/default_apps', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
// do some cleanup in case the file was edited by hand and contains accidentally introduced whitespace
if (is_array($default_apps) && $default_apps) {
$default_apps = array_map('trim', $default_apps);
}
}
if (! (isset($default_apps) && $default_apps)) {
$default_apps = [
'Channel Home',
'Connections',
'Directory',
'Events',
'Files',
'Help',
'Lists',
'Photos',
'Profile Photo',
'Search',
'Settings',
'Stream',
'Suggest Channels',
'View Profile'
];
file_put_contents('cache/default_apps', implode("\n",$default_apps));
}
$x = get_config('system','base_apps',$default_apps);
call_hooks('get_base_apps',$x);
return $x;
}
static public function import_system_apps() {
if (! local_channel()) {
return;

View file

@ -379,7 +379,7 @@ function import_hublocs($channel, $hublocs, $seize, $moving = false) {
// verify the hash. We can only do this if we already stored the xchan corresponding to this hubloc
// as we need the public key from there
if (in_array($hubloc['hubloc_network'],['nomad','zot6']) {
if (in_array($hubloc['hubloc_network'],['nomad','zot6'])) {
$x = q("select xchan_pubkey from xchan where xchan_guid = '%s' and xchan_hash = '%s'",
dbesc($hubloc['hubloc_guid']),
dbesc($hubloc['hubloc_hash'])