Remove servicelevel logic

This commit is contained in:
M. Dent
2018-09-29 00:17:55 +02:00
parent 2904e58a9f
commit 5f992ffe15
16 changed files with 8 additions and 109 deletions

View File

@@ -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);
}

View File

@@ -968,9 +968,6 @@ function bbcode($Text, $options = []) {
$Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" ' . $target . ' rel="nofollow noopener" >$2</a>', $Text);
}
if (get_account_techlevel() < 2)
$Text = str_replace('<span class="bookmark-identifier">#^</span>', '', $Text);
// Perform MAIL Search
if (strpos($Text,'[/mail]') !== false) {
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1" ' . $target . ' rel="nofollow noopener" >$1</a>', $Text);

View File

@@ -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;
}

View File

@@ -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 = [];