Merge remote-tracking branch 'mike/master' into dev

This commit is contained in:
Mario Vavti 2018-10-07 08:39:29 +02:00
commit 5acd166d18
2 changed files with 6 additions and 6 deletions

View File

@ -269,7 +269,7 @@ class Apps {
unset($ret); unset($ret);
break; break;
case 'custom_role': case 'custom_role':
if(get_pconfig(local_channel(),'system','permissions_role') != 'custom') if(get_pconfig(local_channel(),'system','permissions_role') !== 'custom')
unset($ret); unset($ret);
break; break;
case 'observer': case 'observer':
@ -532,8 +532,8 @@ class Apps {
'$installed' => $installed, '$installed' => $installed,
'$action_label' => (($hosturl && in_array($mode, ['view','install'])) ? $install_action : ''), '$action_label' => (($hosturl && in_array($mode, ['view','install'])) ? $install_action : ''),
'$edit' => ((local_channel() && $installed && $mode == 'edit') ? t('Edit') : ''), '$edit' => ((local_channel() && $installed && $mode == 'edit') ? t('Edit') : ''),
'$delete' => ((local_channel() && $mode == 'edit') ? t('Delete') : ''), '$delete' => ((local_channel() && $installed && $mode == 'edit') ? t('Delete') : ''),
'$undelete' => ((local_channel() && $mode == 'edit') ? t('Undelete') : ''), '$undelete' => ((local_channel() && $installed && $mode == 'edit') ? t('Undelete') : ''),
'$settings_url' => ((local_channel() && $installed && $mode == 'list') ? $papp['settings_url'] : ''), '$settings_url' => ((local_channel() && $installed && $mode == 'list') ? $papp['settings_url'] : ''),
'$deleted' => $papp['deleted'], '$deleted' => $papp['deleted'],
'$feature' => (($papp['embed'] || $mode == 'edit') ? false : true), '$feature' => (($papp['embed'] || $mode == 'edit') ? false : true),
@ -982,7 +982,7 @@ class Apps {
$arr['author'] = $sys['channel_hash']; $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); $x = import_xchan_photo(str_replace('$baseurl',z_root(),$arr['photo']),get_observer_hash(),true);
$arr['photo'] = $x[1]; $arr['photo'] = $x[1];
} }
@ -1068,7 +1068,7 @@ class Apps {
if((! $darray['app_url']) || (! $darray['app_id'])) if((! $darray['app_url']) || (! $darray['app_id']))
return $ret; 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); $x = import_xchan_photo(str_replace('$baseurl',z_root(),$arr['photo']),get_observer_hash(),true);
$arr['photo'] = $x[1]; $arr['photo'] = $x[1];
} }

View File

@ -234,7 +234,7 @@ function import_hublocs($channel, $hublocs, $seize, $moving = false) {
if(($x = zot_gethub($arr,false)) === false) { if(($x = zot_gethub($arr,false)) === false) {
unset($hubloc['hubloc_id']); unset($hubloc['hubloc_id']);
create_table_from_array('hubloc', $hubloc); hubloc_store_lowlevel($hubloc);
} }
else { else {
q("UPDATE hubloc set hubloc_primary = %d, hubloc_deleted = %d where hubloc_id = %d", q("UPDATE hubloc set hubloc_primary = %d, hubloc_deleted = %d where hubloc_id = %d",