From 5f992ffe154ed9e2b225c9a1b3d7c47d39e41d34 Mon Sep 17 00:00:00 2001 From: "M. Dent" Date: Sat, 29 Sep 2018 00:17:55 +0200 Subject: Remove servicelevel logic --- include/account.php | 13 +++---------- include/bbcode.php | 3 --- include/features.php | 5 ----- include/nav.php | 2 -- 4 files changed, 3 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/account.php b/include/account.php index 51118c3c5..2ab99ce19 100644 --- a/include/account.php +++ b/include/account.php @@ -124,7 +124,7 @@ function account_store_lowlevel($arr) { 'account_expires' => ((array_key_exists('account_expires',$arr)) ? $arr['account_expires'] : '0001-01-01 00:00:00'), 'account_expire_notified' => ((array_key_exists('account_expire_notified',$arr)) ? $arr['account_expire_notified'] : '0001-01-01 00:00:00'), 'account_service_class' => ((array_key_exists('account_service_class',$arr)) ? $arr['account_service_class'] : ''), - 'account_level' => ((array_key_exists('account_level',$arr)) ? $arr['account_level'] : '0'), + 'account_level' => '5', 'account_password_changed' => ((array_key_exists('account_password_changed',$arr)) ? $arr['account_password_changed'] : '0001-01-01 00:00:00') ]; @@ -215,7 +215,7 @@ function create_account($arr) { 'account_created' => datetime_convert(), 'account_flags' => intval($flags), 'account_roles' => intval($roles), - 'account_level' => intval($techlevel), + 'account_level' => 5, 'account_expires' => $expires, 'account_service_class' => $default_service_class ] @@ -821,13 +821,6 @@ function upgrade_bool_message($bbcode = false) { function get_account_techlevel($account_id = 0) { - if(! $account_id) { - $x = \App::get_account(); - } - else { - $x = get_account_by_id($account_id); - } - - return (($x) ? intval($x['account_level']) : 0); + return (5); } diff --git a/include/bbcode.php b/include/bbcode.php index 6f22509e6..137e25a9c 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -968,9 +968,6 @@ function bbcode($Text, $options = []) { $Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '$2', $Text); } - if (get_account_techlevel() < 2) - $Text = str_replace('#^', '', $Text); - // Perform MAIL Search if (strpos($Text,'[/mail]') !== false) { $Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '$1', $Text); diff --git a/include/features.php b/include/features.php index ccf3c5faf..a3395d7a8 100644 --- a/include/features.php +++ b/include/features.php @@ -416,8 +416,6 @@ function get_features($filtered = true, $level = (-1)) { $arr = $x['features']; - $techlevel = (($level >= 0) ? $level : get_account_techlevel()); - // removed any locked features and remove the entire category if this makes it empty if($filtered) { @@ -428,9 +426,6 @@ function get_features($filtered = true, $level = (-1)) { for($y = 0; $y < count($arr[$k]); $y ++) { $disabled = false; if(is_array($arr[$k][$y])) { - if($arr[$k][$y][5] > $techlevel) { - $disabled = true; - } if($arr[$k][$y][4] !== false) { $disabled = true; } diff --git a/include/nav.php b/include/nav.php index 988a07b7c..b5592d7aa 100644 --- a/include/nav.php +++ b/include/nav.php @@ -60,8 +60,6 @@ function nav($template = 'default') { //we could additionally use this to display important system notifications e.g. for updates )); - $techlevel = get_account_techlevel(); - // nav links: array of array('href', 'text', 'extra css classes', 'title') $nav = []; -- cgit v1.2.3