From 5243dd153bed7fe79188478922a58e8057be3f3e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 7 Aug 2016 17:29:35 -0700 Subject: use config system.server_role and deprecate 'UNO' --- Zotlabs/Lib/System.php | 4 ++-- Zotlabs/Lib/ThreadItem.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Lib') 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; } } -- cgit v1.2.3