aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/System.php4
-rw-r--r--Zotlabs/Lib/ThreadItem.php3
-rw-r--r--Zotlabs/Module/Register.php11
-rw-r--r--Zotlabs/Module/Setup.php24
4 files changed, 23 insertions, 19 deletions
diff --git a/Zotlabs/Lib/System.php b/Zotlabs/Lib/System.php
index c52a90338..4479bf597 100644
--- a/Zotlabs/Lib/System.php
+++ b/Zotlabs/Lib/System.php
@@ -43,8 +43,8 @@ class System {
static public function get_server_role() {
- if(UNO)
- return 'basic';
+ if(is_array(\App::$config) && is_array(\App::$config['system']) && \App::$config['system']['server_role'])
+ return \App::$config['system']['server_role'];
return 'pro';
}
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 638afeb6b..eee3b2a4f 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -245,10 +245,11 @@ class ThreadItem {
);
}
+ $server_role = get_config('system','server_role');
$has_bookmarks = false;
if(is_array($item['term'])) {
foreach($item['term'] as $t) {
- if(!UNO && $t['ttype'] == TERM_BOOKMARK)
+ if(($server_role != 'basic') && ($t['ttype'] == TERM_BOOKMARK))
$has_bookmarks = true;
}
}
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php
index 45123b88d..4cdd27001 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') || UNO) {
+ if(get_config('system','auto_channel_create') || get_config('system','server_role') == 'basic') {
$new_channel = auto_channel_create($result['account']['account_id']);
if($new_channel['success']) {
$channel_id = $new_channel['channel']['channel_id'];
@@ -234,9 +234,12 @@ class Register extends \Zotlabs\Web\Controller {
$privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "");
$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/roles" target="_blank">' . t('Read more about roles') . '</a>',get_roles());
$tos = array('tos', $label_tos, '', '', array(t('no'),t('yes')));
-
- $auto_create = ((UNO) || (get_config('system','auto_channel_create')) ? true : false);
- $default_role = ((UNO) ? 'social' : get_config('system','default_permissions_role'));
+
+ $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'));
require_once('include/bbcode.php');
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index 802f0c216..4553b6866 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -101,7 +101,7 @@ class Setup extends \Zotlabs\Web\Controller {
$timezone = notags(trim($_POST['timezone']));
$adminmail = notags(trim($_POST['adminmail']));
$siteurl = notags(trim($_POST['siteurl']));
- $advanced = ((intval($_POST['advanced'])) ? 1 : 0);
+ $advanced = ((intval($_POST['advanced'])) ? 'pro' : 'basic');
if($siteurl != z_root()) {
$test = z_fetch_url($siteurl."/setup/testrewrite");
@@ -124,17 +124,17 @@ class Setup extends \Zotlabs\Web\Controller {
$tpl = get_intltext_template('htconfig.tpl');
$txt = replace_macros($tpl,array(
- '$dbhost' => $dbhost,
- '$dbport' => $dbport,
- '$dbuser' => $dbuser,
- '$dbpass' => $dbpass,
- '$dbdata' => $dbdata,
- '$dbtype' => $dbtype,
- '$uno' => 1 - $advanced,
- '$timezone' => $timezone,
- '$siteurl' => $siteurl,
- '$site_id' => random_string(),
- '$phpath' => $phpath,
+ '$dbhost' => $dbhost,
+ '$dbport' => $dbport,
+ '$dbuser' => $dbuser,
+ '$dbpass' => $dbpass,
+ '$dbdata' => $dbdata,
+ '$dbtype' => $dbtype,
+ '$server_role' => $advanced,
+ '$timezone' => $timezone,
+ '$siteurl' => $siteurl,
+ '$site_id' => random_string(),
+ '$phpath' => $phpath,
'$adminmail' => $adminmail
));