diff options
author | redmatrix <redmatrix@redmatrix.me> | 2016-01-04 01:02:10 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2016-01-04 01:02:10 -0800 |
commit | 374aadc97ef8f5700563bf719be09dc4e5e92fd4 (patch) | |
tree | ab7f9e20b3efff230e9b93b8d13566180f9ac8a4 /include/widgets.php | |
parent | 5b0a17359d6b5b3e27219c9e56117f1017996175 (diff) | |
download | volse-hubzilla-374aadc97ef8f5700563bf719be09dc4e5e92fd4.tar.gz volse-hubzilla-374aadc97ef8f5700563bf719be09dc4e5e92fd4.tar.bz2 volse-hubzilla-374aadc97ef8f5700563bf719be09dc4e5e92fd4.zip |
Provide a mechanism for a hub admin to lock features in the on or off state. Locked features will not be available in the UI on the Additional Features page to be set by members. If all features are locked, the link to the Additional Features page will not be displayed.
Diffstat (limited to 'include/widgets.php')
-rw-r--r-- | include/widgets.php | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/include/widgets.php b/include/widgets.php index 4b14d6c94..0f170fd52 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -493,38 +493,41 @@ function widget_settings_menu($arr) { 'selected' => ((argv(1) === 'channel') ? 'active' : ''), ), - array( - 'label' => t('Additional features'), - 'url' => $a->get_baseurl(true).'/settings/features', - 'selected' => ((argv(1) === 'features') ? 'active' : ''), - ), + ); - array( - 'label' => t('Feature/Addon settings'), - 'url' => $a->get_baseurl(true).'/settings/featured', - 'selected' => ((argv(1) === 'featured') ? 'active' : ''), - ), + if(get_features()) { + $tabs[] = array( + 'label' => t('Additional features'), + 'url' => $a->get_baseurl(true).'/settings/features', + 'selected' => ((argv(1) === 'features') ? 'active' : ''), + ); + } - array( - 'label' => t('Display settings'), - 'url' => $a->get_baseurl(true).'/settings/display', - 'selected' => ((argv(1) === 'display') ? 'active' : ''), - ), + $tabs[] = array( + 'label' => t('Feature/Addon settings'), + 'url' => $a->get_baseurl(true).'/settings/featured', + 'selected' => ((argv(1) === 'featured') ? 'active' : ''), + ); - array( - 'label' => t('Connected apps'), - 'url' => $a->get_baseurl(true) . '/settings/oauth', - 'selected' => ((argv(1) === 'oauth') ? 'active' : ''), - ), + $tabs[] = array( + 'label' => t('Display settings'), + 'url' => $a->get_baseurl(true).'/settings/display', + 'selected' => ((argv(1) === 'display') ? 'active' : ''), + ); - array( - 'label' => t('Export channel'), - 'url' => $a->get_baseurl(true) . '/uexport', - 'selected' => '' - ), + $tabs[] = array( + 'label' => t('Connected apps'), + 'url' => $a->get_baseurl(true) . '/settings/oauth', + 'selected' => ((argv(1) === 'oauth') ? 'active' : ''), + ); + $tabs[] = array( + 'label' => t('Export channel'), + 'url' => $a->get_baseurl(true) . '/uexport', + 'selected' => '' ); + if($role === false || $role === 'custom') { $tabs[] = array( 'label' => t('Connection Default Permissions'), |