From 8811ca9e9efc8e177a49702066402fae819bdf5b Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 5 Nov 2016 03:31:50 -0700 Subject: provide /locs link on settings page if there is more than one hubloc for this channnel *that isn't deleted*. --- include/widgets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index cc0b20a72..6cff4e4b7 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -581,11 +581,11 @@ function widget_settings_menu($arr) { if($abk) $abook_self_id = $abk[0]['abook_id']; - $hublocs = q("select count(*) as total from hubloc where hubloc_hash = '%s'", + $x = q("select count(*) as total from hubloc where hubloc_hash = '%s' and hubloc_deleted = 0 ", dbesc($channel['channel_hash']) ); - $hublocs = (($hublocs[0]['total'] > 1) ? true : false); + $hublocs = (($x && $x[0]['total'] > 1) ? true : false); $tabs = array( array( -- cgit v1.2.3