aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-26 14:34:19 -0700
committerredmatrix <git@macgirvin.com>2016-03-26 14:34:19 -0700
commitd3f38c9f43665e1826c332d5afd3249666915fdf (patch)
treed5cd83e2e76397e013755327c5a670ce9a856cd2 /include
parent971e7321c65a8cb424fac3de34af9176275aac17 (diff)
parenteeb1c463e37380c4dd7ac3fccf32d26e91a469ce (diff)
downloadvolse-hubzilla-d3f38c9f43665e1826c332d5afd3249666915fdf.tar.gz
volse-hubzilla-d3f38c9f43665e1826c332d5afd3249666915fdf.tar.bz2
volse-hubzilla-d3f38c9f43665e1826c332d5afd3249666915fdf.zip
Merge https://github.com/redmatrix/hubzilla into pending_merge
Diffstat (limited to 'include')
-rw-r--r--include/widgets.php26
1 files changed, 20 insertions, 6 deletions
diff --git a/include/widgets.php b/include/widgets.php
index deb514915..ac0b6a84f 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(
@@ -551,6 +559,12 @@ function widget_settings_menu($arr) {
);
}
+ $tabs[] = array(
+ 'label' => t('Connected apps'),
+ 'url' => $a->get_baseurl(true) . '/settings/oauth',
+ 'selected' => ((argv(1) === 'oauth') ? 'active' : ''),
+ );
+
if($role === false || $role === 'custom') {
$tabs[] = array(
'label' => t('Connection Default Permissions'),