Avoid globals where possible

$logged => logged()
$account_logged => accountLogged()
This commit is contained in:
slawkens
2025-03-16 12:36:22 +01:00
parent a71f41193c
commit 13b8fcf454
85 changed files with 226 additions and 192 deletions

View File

@@ -1544,7 +1544,8 @@ Sent by MyAAC,<br/>
'default' => 'premium_points',
'callbacks' => [
'beforeSave' => function($key, $value, &$errorMessage) {
global $db;
$db = app()->get('database');
if ($value == 'coins' && !$db->hasColumn('accounts', 'coins')) {
$errorMessage = "Shop: Donate Column: Cannot set column to coins, because it doesn't exist in database.";
return false;