diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-03-26 18:43:38 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-03-26 18:43:38 +0100 |
commit | a50706317435d09cacb95cad0a6ccaf8ae5b5f6c (patch) | |
tree | b97b9ca3d74ddc1b70b390ec37f3eb132c742256 /include | |
parent | 0a14ac1f60b70fe038cf714ac1e856c2bc66a92d (diff) | |
download | volse-hubzilla-a50706317435d09cacb95cad0a6ccaf8ae5b5f6c.tar.gz volse-hubzilla-a50706317435d09cacb95cad0a6ccaf8ae5b5f6c.tar.bz2 volse-hubzilla-a50706317435d09cacb95cad0a6ccaf8ae5b5f6c.zip |
move link to /locs to settings menu if we have more than one location and some template work on locs
Diffstat (limited to 'include')
-rw-r--r-- | include/widgets.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/widgets.php b/include/widgets.php index deb514915..010fcf0ae 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -501,6 +501,12 @@ 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'", + dbesc($channel['channel_hash']) + ); + + $hublocs = (($hublocs[0]['total'] > 1) ? true : false); + $tabs = array( array( 'label' => t('Account settings'), @@ -534,14 +540,16 @@ function widget_settings_menu($arr) { 'label' => t('Display settings'), 'url' => $a->get_baseurl(true).'/settings/display', 'selected' => ((argv(1) === 'display') ? 'active' : ''), - ); - - $tabs[] = array( - 'label' => t('Connected apps'), - 'url' => $a->get_baseurl(true) . '/settings/oauth', - 'selected' => ((argv(1) === 'oauth') ? 'active' : ''), ); + if($hublocs) { + $tabs[] = array( + 'label' => t('Manage locations'), + 'url' => $a->get_baseurl(true) . '/locs', + 'selected' => ((argv(1) === 'locs') ? 'active' : ''), + ); + } + // IF can go away when UNO export and import is fully functional if(! UNO) { $tabs[] = array( |