From 835e222af0df627a262ab55e940f9d3808b6e000 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 5 Oct 2018 16:27:50 -0700 Subject: minor app cleanup --- Zotlabs/Lib/Apps.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 8db4e000f..7f4bd6ef9 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -272,7 +272,7 @@ class Apps { unset($ret); break; case 'custom_role': - if(get_pconfig(local_channel(),'system','permissions_role') != 'custom') + if(get_pconfig(local_channel(),'system','permissions_role') !== 'custom') unset($ret); break; case 'observer': @@ -535,8 +535,8 @@ class Apps { '$installed' => $installed, '$action_label' => (($hosturl && in_array($mode, ['view','install'])) ? $install_action : ''), '$edit' => ((local_channel() && $installed && $mode == 'edit') ? t('Edit') : ''), - '$delete' => ((local_channel() && $mode == 'edit') ? t('Delete') : ''), - '$undelete' => ((local_channel() && $mode == 'edit') ? t('Undelete') : ''), + '$delete' => ((local_channel() && $installed && $mode == 'edit') ? t('Delete') : ''), + '$undelete' => ((local_channel() && $installed && $mode == 'edit') ? t('Undelete') : ''), '$settings_url' => ((local_channel() && $installed && $mode == 'list') ? $papp['settings_url'] : ''), '$deleted' => $papp['deleted'], '$feature' => (($papp['embed'] || $mode == 'edit') ? false : true), @@ -985,7 +985,7 @@ class Apps { $arr['author'] = $sys['channel_hash']; } - if($arr['photo'] && (strpos($arr['photo'],'icon:') === false) && (! strpos($arr['photo'],z_root()))) { + if($arr['photo'] && (strpos($arr['photo'],'icon:') === false) && (strpos($arr['photo'],z_root()) !== false)) { $x = import_xchan_photo(str_replace('$baseurl',z_root(),$arr['photo']),get_observer_hash(),true); $arr['photo'] = $x[1]; } @@ -1071,7 +1071,7 @@ class Apps { if((! $darray['app_url']) || (! $darray['app_id'])) return $ret; - if($arr['photo'] && (strpos($arr['photo'],'icon:') === false) && (! strpos($arr['photo'],z_root()))) { + if($arr['photo'] && (strpos($arr['photo'],'icon:') === false) && (strpos($arr['photo'],z_root()) !== false)) { $x = import_xchan_photo(str_replace('$baseurl',z_root(),$arr['photo']),get_observer_hash(),true); $arr['photo'] = $x[1]; } -- cgit v1.2.3 From 52be5c1660abb1f3f8c6a8f0ba09799615214c30 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 6 Oct 2018 14:47:40 -0700 Subject: use hubloc_store_lowlevel to ensure all hubloc columns are initialised --- include/import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/import.php b/include/import.php index 0fc24a26f..714161c57 100644 --- a/include/import.php +++ b/include/import.php @@ -234,7 +234,7 @@ function import_hublocs($channel, $hublocs, $seize, $moving = false) { if(($x = zot_gethub($arr,false)) === false) { unset($hubloc['hubloc_id']); - create_table_from_array('hubloc', $hubloc); + hubloc_store_lowlevel($hubloc); } else { q("UPDATE hubloc set hubloc_primary = %d, hubloc_deleted = %d where hubloc_id = %d", -- cgit v1.2.3