diff --git a/admin/pages/accounts.php b/admin/pages/accounts.php
index 67381b5e..3358b265 100644
--- a/admin/pages/accounts.php
+++ b/admin/pages/accounts.php
@@ -94,7 +94,7 @@ else if (isset($_REQUEST['search'])) {
?>
get('groups');
if ($id > 0) {
$account = new OTS_Account();
$account->load($id);
diff --git a/admin/pages/pages.php b/admin/pages/pages.php
index 586d7e53..6cd944eb 100644
--- a/admin/pages/pages.php
+++ b/admin/pages/pages.php
@@ -25,7 +25,7 @@ if (!hasFlag(FLAG_CONTENT_PAGES) && !superAdmin()) {
header('X-XSS-Protection:0');
$name = $p_title = null;
-$groups = new OTS_Groups_List();
+$groups = app()->get('groups');
$php = false;
$enable_tinymce = true;
diff --git a/admin/pages/players.php b/admin/pages/players.php
index c44bc012..341ab687 100644
--- a/admin/pages/players.php
+++ b/admin/pages/players.php
@@ -71,7 +71,7 @@ else if (isset($_REQUEST['search'])) {
?>
get('groups');
if ($id > 0) {
$player = new OTS_Player();
$player->load($id);
diff --git a/install/steps/7-finish.php b/install/steps/7-finish.php
index 0ae302ea..cb4e5821 100644
--- a/install/steps/7-finish.php
+++ b/install/steps/7-finish.php
@@ -58,7 +58,7 @@ if ($db->hasTable('players')) {
$player_used = &$player_db;
}
- $groups = new OTS_Groups_List();
+ $groups = app()->get('groups');
$player_used->setGroupId($groups->getHighestId());
}
diff --git a/system/pages/account/manage.php b/system/pages/account/manage.php
index 3b3dc288..f5a34a25 100644
--- a/system/pages/account/manage.php
+++ b/system/pages/account/manage.php
@@ -34,7 +34,7 @@ if(isset($_REQUEST['redirect']))
return;
}
-$groups = new OTS_Groups_List();
+$groups = app()->get('groups');
$freePremium = isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium']) || $account_logged->getPremDays() == OTS_Account::GRATIS_PREMIUM_DAYS;
$dayOrDays = $account_logged->getPremDays() == 1 ? 'day' : 'days';
diff --git a/system/pages/forum/admin.php b/system/pages/forum/admin.php
index 6e35bba5..512fed56 100644
--- a/system/pages/forum/admin.php
+++ b/system/pages/forum/admin.php
@@ -17,7 +17,7 @@ if(!$canEdit) {
return;
}
-$groupsList = new OTS_Groups_List();
+$groupsList = app()->get('groups');
$groups = [
['id' => 0, 'name' => 'Guest'],
];
diff --git a/system/pages/forum/show_thread.php b/system/pages/forum/show_thread.php
index e4c53f16..9e68d339 100644
--- a/system/pages/forum/show_thread.php
+++ b/system/pages/forum/show_thread.php
@@ -50,7 +50,7 @@ if(isset($posts[0]['player_id'])) {
}
$lookaddons = $db->hasColumn('players', 'lookaddons');
-$groups = new OTS_Groups_List();
+$groups = app()->get('groups');
foreach($posts as &$post) {
$post['player'] = new OTS_Player();
$player = $post['player'];
diff --git a/system/pages/team.php b/system/pages/team.php
index ae0c9d93..3dff7a33 100644
--- a/system/pages/team.php
+++ b/system/pages/team.php
@@ -14,7 +14,7 @@ $title = 'Support in game';
if(setting('core.account_country'))
require SYSTEM . 'countries.conf.php';
-$groups = new OTS_Groups_List();
+$groups = app()->get('groups');
if(!$groups->count())
{
echo 'Error while reading groups.xml';