aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-07 17:29:35 -0700
committerredmatrix <git@macgirvin.com>2016-08-07 17:29:35 -0700
commit5243dd153bed7fe79188478922a58e8057be3f3e (patch)
tree92ca6142a60f235cf70c4a31cda0b7ffc6d68c86 /include
parente1659b0725c275c2ba5f38a02a0f3fbcec145519 (diff)
downloadvolse-hubzilla-5243dd153bed7fe79188478922a58e8057be3f3e.tar.gz
volse-hubzilla-5243dd153bed7fe79188478922a58e8057be3f3e.tar.bz2
volse-hubzilla-5243dd153bed7fe79188478922a58e8057be3f3e.zip
use config system.server_role and deprecate 'UNO'
Diffstat (limited to 'include')
-rw-r--r--include/account.php4
-rw-r--r--include/bbcode.php2
-rw-r--r--include/channel.php8
-rw-r--r--include/conversation.php2
-rw-r--r--include/features.php6
-rw-r--r--include/nav.php20
-rw-r--r--include/widgets.php4
-rw-r--r--include/zot.php6
8 files changed, 24 insertions, 28 deletions
diff --git a/include/account.php b/include/account.php
index 142ad1bea..5c44f13ca 100644
--- a/include/account.php
+++ b/include/account.php
@@ -407,7 +407,7 @@ function account_allow($hash) {
pop_lang();
- if(get_config('system','auto_channel_create') || UNO)
+ if(get_config('system','auto_channel_create') || get_config('system','server_role') === 'basic')
auto_channel_create($register[0]['uid']);
if ($res) {
@@ -511,7 +511,7 @@ function account_approve($hash) {
- if(get_config('system','auto_channel_create') || UNO)
+ if(get_config('system','auto_channel_create') || get_config('system','server_role') === 'basic')
auto_channel_create($register[0]['uid']);
else {
$_SESSION['login_return_url'] = 'new_channel';
diff --git a/include/bbcode.php b/include/bbcode.php
index 7f7be4300..db3a1011b 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -667,7 +667,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
}
// Remove bookmarks from UNO
- if (UNO)
+ if (get_config('system','server_role') === 'basic')
$Text = str_replace('<span class="bookmark-identifier">#^</span>', '', $Text);
// Perform MAIL Search
diff --git a/include/channel.php b/include/channel.php
index c07cd14e2..ff2cf24d8 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -423,14 +423,6 @@ function create_identity($arr) {
set_pconfig($ret['channel']['channel_id'],'system','attach_path','%Y-%m');
}
- // UNO: channel defaults, incl addons (addons specific pconfig will only work after the relevant addon is enabled by the admin). It's located here, so members can modify these defaults after the channel is created.
- if(UNO) {
- //diaspora protocol addon
- set_pconfig($ret['channel']['channel_id'],'system','diaspora_allowed', '1');
- set_pconfig($ret['channel']['channel_id'],'system','diaspora_public_comments', '1');
- set_pconfig($ret['channel']['channel_id'],'system','prevent_tag_hijacking', '0');
- }
-
// auto-follow any of the hub's pre-configured channel choices.
// Only do this if it's the first channel for this account;
// otherwise it could get annoying. Don't make this list too big
diff --git a/include/conversation.php b/include/conversation.php
index 6bcd968f4..35dfb0b6e 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1709,7 +1709,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
);
}
- if(feature_enabled($uid,'wiki') && (! UNO)) {
+ if(feature_enabled($uid,'wiki') && (get_config('system','server_role') !== 'basic')) {
$tabs[] = array(
'label' => t('Wiki'),
'url' => z_root() . '/wiki/' . $nickname,
diff --git a/include/features.php b/include/features.php
index 2d71aa9be..041c028c6 100644
--- a/include/features.php
+++ b/include/features.php
@@ -38,7 +38,9 @@ function get_feature_default($feature) {
function get_features($filtered = true) {
- if(UNO && $filtered)
+ $server_role = get_config('system','server_role');
+
+ if($server_role === 'basic' && $filtered)
return array();
$arr = array(
@@ -52,7 +54,7 @@ function get_features($filtered = true) {
array('advanced_profiles', t('Advanced Profiles'), t('Additional profile sections and selections'),false,get_config('feature_lock','advanced_profiles')),
array('profile_export', t('Profile Import/Export'), t('Save and load profile details across sites/channels'),false,get_config('feature_lock','profile_export')),
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel'),false,get_config('feature_lock','webpages')),
- array('wiki', t('Wiki'), t('Provide a wiki for your channel'),((UNO) ? false : true),get_config('feature_lock','wiki')),
+ array('wiki', t('Wiki'), t('Provide a wiki for your channel'),(($server_role === 'basic') ? false : true),get_config('feature_lock','wiki')),
array('hide_rating', t('Hide Rating'), t('Hide the rating buttons on your channel and profile pages. Note: People can still rate you somewhere else.'),false,get_config('feature_lock','hide_rating')),
array('private_notes', t('Private Notes'), t('Enables a tool to store notes and reminders (note: not encrypted)'),false,get_config('feature_lock','private_notes')),
array('nav_channel_select', t('Navigation Channel Select'), t('Change channels directly from within the navigation dropdown menu'),false,get_config('feature_lock','nav_channel_select')),
diff --git a/include/nav.php b/include/nav.php
index 1fb0e98dc..025da71b3 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -61,13 +61,15 @@ EOT;
'$banner' => $banner
));
+ $server_role = get_config('system','server_role');
+ $basic = (($server_role === 'basic') ? true : false);
// nav links: array of array('href', 'text', 'extra css classes', 'title')
$nav = Array();
/**
* Display login or logout
- */
+ */
$nav['usermenu']=array();
$userinfo = null;
@@ -76,7 +78,7 @@ EOT;
if(local_channel()) {
- if($chans && count($chans) > 1 && feature_enabled(local_channel(),'nav_channel_select') && (! UNO))
+ if($chans && count($chans) > 1 && feature_enabled(local_channel(),'nav_channel_select') && (! $basic))
$nav['channels'] = $chans;
$nav['logout'] = Array('logout',t('Logout'), "", t('End this session'),'logout_nav_btn');
@@ -84,7 +86,7 @@ EOT;
// user menu
$nav['usermenu'][] = Array('channel/' . $channel['channel_address'], t('Home'), "", t('Your posts and conversations'),'channel_nav_btn');
$nav['usermenu'][] = Array('profile/' . $channel['channel_address'], t('View Profile'), "", t('Your profile page'),'profile_nav_btn');
- if(feature_enabled(local_channel(),'multi_profiles') && (! UNO))
+ if(feature_enabled(local_channel(),'multi_profiles') && (! $basic))
$nav['usermenu'][] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit profiles'),'profiles_nav_btn');
else
$nav['usermenu'][] = Array('profiles/' . $prof[0]['id'], t('Edit Profile'),"", t('Edit your profile'),'profiles_nav_btn');
@@ -92,19 +94,19 @@ EOT;
$nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'),'photos_nav_btn');
$nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files'),'cloud_nav_btn');
- if((! UNO) && feature_enabled(local_channel(),'ajaxchat'))
+ if((! $basic) && feature_enabled(local_channel(),'ajaxchat'))
$nav['usermenu'][] = Array('chat/' . $channel['channel_address'], t('Chat'),"",t('Your chatrooms'),'chat_nav_btn');
require_once('include/menu.php');
$has_bookmarks = menu_list_count(local_channel(),'',MENU_BOOKMARK) + menu_list_count(local_channel(),'',MENU_SYSTEM|MENU_BOOKMARK);
- if(($has_bookmarks) && (! UNO)) {
+ if(($has_bookmarks) && (! $basic)) {
$nav['usermenu'][] = Array('bookmarks', t('Bookmarks'), "", t('Your bookmarks'),'bookmarks_nav_btn');
}
- if(feature_enabled($channel['channel_id'],'webpages') && (! UNO))
+ if(feature_enabled($channel['channel_id'],'webpages') && (! $basic))
$nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages'),'webpages_nav_btn');
- if(feature_enabled($channel['channel_id'],'wiki') && (! UNO))
+ if(feature_enabled($channel['channel_id'],'wiki') && (! $basic))
$nav['usermenu'][] = Array('wiki/' . $channel['channel_address'],t('Wiki'),"",t('Your wiki'),'wiki_nav_btn');
}
else {
@@ -161,7 +163,7 @@ EOT;
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'), 'help_nav_btn', $context_help, $enable_context_help);
}
- if(! UNO)
+ if(! $basic)
$nav['apps'] = array('apps', t('Apps'), "", t('Applications, utilities, links, games'),'apps_nav_btn');
$nav['search'] = array('search', t('Search'), "", t('Search site @name, #tag, ?docs, content'));
@@ -204,7 +206,7 @@ EOT;
$nav['all_events']['all']=array('events', t('See all events'), "", "");
$nav['all_events']['mark'] = array('', t('Mark all events seen'), '','');
- if(! UNO)
+ if(! $basic)
$nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn');
$nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'),'settings_nav_btn');
diff --git a/include/widgets.php b/include/widgets.php
index 5477dc1e4..68db74703 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -595,7 +595,7 @@ function widget_settings_menu($arr) {
}
// IF can go away when UNO export and import is fully functional
- if(! UNO) {
+ if(get_config('system','server_role') !== 'basic') {
$tabs[] = array(
'label' => t('Export channel'),
'url' => z_root() . '/uexport',
@@ -609,7 +609,7 @@ function widget_settings_menu($arr) {
'selected' => ((argv(1) === 'oauth') ? 'active' : ''),
);
- if(! UNO) {
+ if(get_config('system','server_role') !== 'basic') {
$tabs[] = array(
'label' => t('Guest Access Tokens'),
'url' => z_root() . '/settings/tokens',
diff --git a/include/zot.php b/include/zot.php
index 73d9ef950..4e443652f 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2251,7 +2251,7 @@ function check_location_move($sender_hash,$locations) {
if(! $locations)
return;
- if(! UNO)
+ if(get_config('system','server_role') !== 'basic')
return;
if(count($locations) != 1)
@@ -2929,7 +2929,7 @@ function import_site($arr, $pubkey) {
*/
function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
- if(UNO)
+ if(get_config('system','server_role') === 'basic')
return;
logger('build_sync_packet');
@@ -3077,7 +3077,7 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
*/
function process_channel_sync_delivery($sender, $arr, $deliveries) {
- if(UNO)
+ if(get_config('system','server_role') === 'basic')
return;
require_once('include/import.php');