aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-29 13:50:02 -0700
committerzotlabs <mike@macgirvin.com>2017-05-29 13:50:02 -0700
commit4fcfcc81172ebdfa4a27d3bca94bffe97356f600 (patch)
tree78a53b004556fa1064e9213008e68d897a296fe2
parentb15a5f03e61eeef2086d87f497464b00ada3798e (diff)
downloadvolse-hubzilla-4fcfcc81172ebdfa4a27d3bca94bffe97356f600.tar.gz
volse-hubzilla-4fcfcc81172ebdfa4a27d3bca94bffe97356f600.tar.bz2
volse-hubzilla-4fcfcc81172ebdfa4a27d3bca94bffe97356f600.zip
start deprecation of server_role
-rw-r--r--Zotlabs/Lib/ThreadItem.php2
-rw-r--r--Zotlabs/Module/Admin/Site.php10
-rw-r--r--Zotlabs/Module/Chanview.php6
-rw-r--r--Zotlabs/Module/Import.php3
-rw-r--r--Zotlabs/Module/Register.php8
-rw-r--r--Zotlabs/Module/Settings/Channel.php1
-rw-r--r--Zotlabs/Module/Setup.php8
-rw-r--r--include/account.php10
-rw-r--r--include/features.php23
-rw-r--r--include/nav.php9
-rw-r--r--include/zot.php7
-rwxr-xr-xview/tpl/admin_site.tpl3
-rwxr-xr-xview/tpl/settings.tpl9
13 files changed, 23 insertions, 76 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 5910ea672..ff4e3205e 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -251,8 +251,6 @@ class ThreadItem {
);
}
- $server_role = get_config('system','server_role');
-
$has_bookmarks = false;
if(is_array($item['term'])) {
foreach($item['term'] as $t) {
diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php
index d05e70aa9..4c5b82e78 100644
--- a/Zotlabs/Module/Admin/Site.php
+++ b/Zotlabs/Module/Admin/Site.php
@@ -17,7 +17,6 @@ class Site {
check_form_security_token_redirectOnErr('/admin/site', 'admin_site');
$sitename = ((x($_POST,'sitename')) ? notags(trim($_POST['sitename'])) : '');
- $server_role = ((x($_POST,'server_role')) ? notags(trim($_POST['server_role'])) : 'standard');
$banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false);
@@ -68,7 +67,6 @@ class Site {
if(array_key_exists('techlevel', $_POST))
$techlevel = intval($_POST['techlevel']);
- set_config('system', 'server_role', $server_role);
set_config('system', 'feed_contacts', $feed_contacts);
set_config('system', 'delivery_interval', $delivery_interval);
set_config('system', 'delivery_batch_count', $delivery_batch_count);
@@ -254,12 +252,6 @@ class Site {
// now invert the logic for the setting.
$discover_tab = (1 - $discover_tab);
- $server_roles = [
- 'basic' => t('Basic/Minimal Social Networking'),
- 'standard' => t('Standard Configuration (default)'),
- 'pro' => t('Professional')
- ];
-
$techlevels = [
'0' => t('Beginner/Basic'),
'1' => t('Novice - not skilled but willing to learn'),
@@ -286,8 +278,6 @@ class Site {
// name, label, value, help string, extra data...
'$sitename' => array('sitename', t("Site name"), htmlspecialchars(get_config('system','sitename'), ENT_QUOTES, 'UTF-8'),''),
- '$server_role' => array('server_role', t("Server Configuration/Role"), get_config('system','server_role'),'',$server_roles),
-
'$techlevel' => [ 'techlevel', t('Site default technical skill level'), get_config('system','techlevel'), t('Used to provide a member experience matched to technical comfort level'), $techlevels ],
'$techlock' => [ 'techlock', t('Lock the technical skill level setting'), get_config('system','techlevel_lock'), t('Members can set their own technical comfort level by default') ],
diff --git a/Zotlabs/Module/Chanview.php b/Zotlabs/Module/Chanview.php
index 01ee74d5a..c3194184a 100644
--- a/Zotlabs/Module/Chanview.php
+++ b/Zotlabs/Module/Chanview.php
@@ -117,12 +117,8 @@ class Chanview extends \Zotlabs\Web\Controller {
// the remote profile.
// Zot channels will usually have a connect link.
- // If it isn't zot, 'pro' members won't be able to use the connect
- // button as it is a foreign network so just send them to the remote
- // profile.
-
- if($is_zot || \Zotlabs\Lib\System::get_server_role() === 'pro') {
+ if($is_zot) {
if($is_zot && $observer) {
$url = zid($url);
}
diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php
index a2f83e1cb..40ce8f6d1 100644
--- a/Zotlabs/Module/Import.php
+++ b/Zotlabs/Module/Import.php
@@ -121,8 +121,7 @@ class Import extends \Zotlabs\Web\Controller {
$t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
notice($t);
}
- if(array_key_exists('server_role',$data['compatibility']) && $data['compatibility']['server_role'] == 'basic')
- $moving = true;
+
}
if($moving)
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php
index d1986bea5..d4573156c 100644
--- a/Zotlabs/Module/Register.php
+++ b/Zotlabs/Module/Register.php
@@ -151,7 +151,7 @@ class Register extends \Zotlabs\Web\Controller {
$new_channel = false;
$next_page = 'new_channel';
- if(get_config('system','auto_channel_create') || get_config('system','server_role') == 'basic') {
+ if(get_config('system','auto_channel_create')) {
$new_channel = auto_channel_create($result['account']['account_id']);
if($new_channel['success']) {
$channel_id = $new_channel['channel']['channel_id'];
@@ -240,11 +240,9 @@ class Register extends \Zotlabs\Web\Controller {
$role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/member/member_guide#Account_Permission_Roles" target="_blank">' . t('Read more about roles') . '</a>',$perm_roles);
$tos = array('tos', $label_tos, '', '', array(t('no'),t('yes')));
- $server_role = get_config('system','server_role');
-
- $auto_create = (($server_role == 'basic') || (get_config('system','auto_channel_create')) ? true : false);
- $default_role = (($server_role == 'basic') ? 'social' : get_config('system','default_permissions_role'));
+ $auto_create = (get_config('system','auto_channel_create') ? true : false);
+ $default_role = get_config('system','default_permissions_role');
require_once('include/bbcode.php');
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index 56a7d0d8e..7c30ef93e 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -489,7 +489,6 @@ class Channel {
'$h_prv' => t('Security and Privacy Settings'),
'$permissions_set' => $permissions_set,
- '$server_role' => \Zotlabs\Lib\System::get_server_role(),
'$perms_set_msg' => t('Your permissions are already configured. Click to view/adjust'),
'$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents displaying in your profile that you are online'), $yes_no),
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index aa28204d3..e5b54cc5f 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -73,9 +73,6 @@ class Setup extends \Zotlabs\Web\Controller {
$phpath = trim($_POST['phpath']);
$adminmail = trim($_POST['adminmail']);
$siteurl = trim($_POST['siteurl']);
- $server_role = trim($_POST['server_role']);
- if(! $server_role)
- $server_role = 'standard';
// $siteurl should not have a trailing slash
@@ -103,9 +100,6 @@ class Setup extends \Zotlabs\Web\Controller {
$timezone = trim($_POST['timezone']);
$adminmail = trim($_POST['adminmail']);
$siteurl = trim($_POST['siteurl']);
- $server_role = trim($_POST['server_role']);
- if(! $server_role)
- $server_role = 'standard';
if($siteurl != z_root()) {
$test = z_fetch_url($siteurl."/setup/testrewrite");
@@ -134,7 +128,7 @@ class Setup extends \Zotlabs\Web\Controller {
'$dbpass' => $dbpass,
'$dbdata' => $dbdata,
'$dbtype' => $dbtype,
- '$server_role' => $server_role,
+ '$server_role' => 'pro',
'$timezone' => $timezone,
'$siteurl' => $siteurl,
'$site_id' => random_string(),
diff --git a/include/account.php b/include/account.php
index c188ce0d7..499f7303a 100644
--- a/include/account.php
+++ b/include/account.php
@@ -424,7 +424,7 @@ function account_allow($hash) {
pop_lang();
- if(get_config('system','auto_channel_create') || get_config('system','server_role') === 'basic')
+ if(get_config('system','auto_channel_create'))
auto_channel_create($register[0]['uid']);
if ($res) {
@@ -528,7 +528,7 @@ function account_approve($hash) {
- if(get_config('system','auto_channel_create') || get_config('system','server_role') === 'basic')
+ if(get_config('system','auto_channel_create'))
auto_channel_create($register[0]['uid']);
else {
$_SESSION['login_return_url'] = 'new_channel';
@@ -772,12 +772,6 @@ function upgrade_bool_message($bbcode = false) {
function get_account_techlevel($account_id = 0) {
- $role = \Zotlabs\Lib\System::get_server_role();
- if($role == 'basic')
- return 0;
- if($role == 'standard')
- return 5;
-
if(! $account_id) {
$x = \App::get_account();
}
diff --git a/include/features.php b/include/features.php
index 0fc6fbc1d..f32dbe82e 100644
--- a/include/features.php
+++ b/include/features.php
@@ -45,10 +45,6 @@ function feature_level($feature,$def) {
function get_features($filtered = true) {
- $server_role = \Zotlabs\Lib\System::get_server_role();
-
- if($server_role === 'basic' && $filtered)
- return array();
$arr = [
@@ -424,16 +420,15 @@ function get_features($filtered = true) {
];
- if($server_role === 'pro') {
- $arr['general'][] = [
- 'premium_channel',
- t('Premium Channel'),
- t('Allows you to set restrictions and terms on those that connect with your channel'),
- false,
- get_config('feature_lock','premium_channel'),
- feature_level('premium_channel',4),
- ];
- }
+ $arr['general'][] = [
+ 'premium_channel',
+ t('Premium Channel'),
+ t('Allows you to set restrictions and terms on those that connect with your channel'),
+ false,
+ get_config('feature_lock','premium_channel'),
+ feature_level('premium_channel',4),
+ ];
+
$techlevel = get_account_techlevel();
diff --git a/include/nav.php b/include/nav.php
index 91bade5a7..4d6c479da 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -65,8 +65,6 @@ EOT;
//we could additionally use this to display important system notifications e.g. for updates
));
- $server_role = get_config('system','server_role');
- $basic = (($server_role === 'basic') ? true : false);
$techlevel = get_account_techlevel();
// nav links: array of array('href', 'text', 'extra css classes', 'title')
@@ -97,7 +95,7 @@ EOT;
if(local_channel()) {
- if($chans && count($chans) > 1 && feature_enabled(local_channel(),'nav_channel_select') && (! $basic))
+ if($chans && count($chans) > 1 && feature_enabled(local_channel(),'nav_channel_select'))
$nav['channels'] = $chans;
$nav['logout'] = ['logout',t('Logout'), "", t('End this session'),'logout_nav_btn'];
@@ -105,7 +103,7 @@ EOT;
// user menu
$nav['usermenu'][] = ['profile/' . $channel['channel_address'], t('View Profile'), "", t('Your profile page'),'profile_nav_btn'];
- if(feature_enabled(local_channel(),'multi_profiles') && (! $basic))
+ if(feature_enabled(local_channel(),'multi_profiles'))
$nav['usermenu'][] = ['profiles', t('Edit Profiles'),"", t('Manage/Edit profiles'),'profiles_nav_btn'];
else
$nav['usermenu'][] = ['profiles/' . $prof[0]['id'], t('Edit Profile'),"", t('Edit your profile'),'profiles_nav_btn'];
@@ -201,8 +199,7 @@ EOT;
$nav['all_events']['all']=array('events', t('View events'), "", "");
$nav['all_events']['mark'] = array('', t('Mark all events seen'), '','');
- if(! $basic)
- $nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn');
+ $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/zot.php b/include/zot.php
index d2088f272..9458b1f1e 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2237,9 +2237,6 @@ function check_location_move($sender_hash,$locations) {
if(! $locations)
return;
- if(get_config('system','server_role') !== 'basic')
- return;
-
if(count($locations) != 1)
return;
@@ -2935,8 +2932,6 @@ function import_site($arr, $pubkey) {
function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
- if(get_config('system','server_role') === 'basic')
- return;
logger('build_sync_packet');
@@ -3086,8 +3081,6 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
function process_channel_sync_delivery($sender, $arr, $deliveries) {
- if(get_config('system','server_role') === 'basic')
- return;
require_once('include/import.php');
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index 6fd0fd9ce..e995f82b2 100755
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -41,12 +41,9 @@
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
{{include file="field_input.tpl" field=$sitename}}
- {{include file="field_select.tpl" field=$server_role}}
- {{if $z_server_role == 'pro'}}
{{include file="field_select.tpl" field=$techlevel}}
{{include file="field_checkbox.tpl" field=$techlock}}
- {{/if}}
{{include file="field_textarea.tpl" field=$banner}}
{{include file="field_textarea.tpl" field=$siteinfo}}
diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl
index dd5fecb43..6673e5815 100755
--- a/view/tpl/settings.tpl
+++ b/view/tpl/settings.tpl
@@ -1,6 +1,6 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
- {{if $server_role != 'basic'}}<a title="{{$removechannel}}" class="btn btn-danger btn-sm pull-right" href="removeme"><i class="fa fa-trash-o"></i>&nbsp;{{$removeme}}</a>{{/if}}
+ <a title="{{$removechannel}}" class="btn btn-danger btn-sm pull-right" href="removeme"><i class="fa fa-trash-o"></i>&nbsp;{{$removeme}}</a>
<h2>{{$ptitle}}</h2>
<div class="clear"></div>
</div>
@@ -44,12 +44,9 @@
</div>
<div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings">
<div class="section-content-tools-wrapper">
- {{if $server_role != 'basic'}}
{{include file="field_select_grouped.tpl" field=$role}}
- {{/if}}
- <div id="advanced-perm" style="display:{{if $permissions_set && $server_role != 'basic' }}none{{else}}block{{/if}};">
+ <div id="advanced-perm" style="display:{{if $permissions_set}}none{{else}}block{{/if}};">
- {{if $server_role != 'basic'}}
<div class="form-group">
<button type="button" class="btn btn-outline-secondary" data-toggle="modal" data-target="#apsModal">{{$lbl_p2macro}}</button>
</div>
@@ -71,7 +68,7 @@
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
- {{/if}}
+
<div id="settings-default-perms" class="form-group" >
<button type="button" class="btn btn-outline-secondary" data-toggle="modal" data-target="#aclModal"><i id="jot-perms-icon" class="fa"></i>&nbsp;{{$permissions}}</button>
</div>