Перенос разрозненных файлов в фабрику. Утилизация неиспользуемых функций. #49

This commit is contained in:
2023-12-05 03:01:04 +02:00
parent 98f4cbcef3
commit 7a5fd62f1e
79 changed files with 12178 additions and 12956 deletions
+5 -5
View File
@@ -931,7 +931,7 @@ class FightRequest
$teams = ArraySorter::groupBy($cb, 'team');
foreach ($teams as $teamId => $team) {
foreach ($team as $key => $player) {
$players .= $this->u->getLogin($player['id']);
$players .= User::getLogin($player['id']);
if ($key !== array_key_last($team)) {
$players .= ', ';
} else {
@@ -1038,7 +1038,7 @@ class FightRequest
$uids = Db::getColumn('select id from stats where zv = ?', [$pl['id']]);
$cols = count($uids);
foreach ($uids as $uid) {
$tm .= $this->u->getLogin($uid) . ', ';
$tm .= User::getLogin($uid) . ', ';
}
$tm = rtrim($tm, ', ');
@@ -1049,7 +1049,7 @@ class FightRequest
$unvs = '';
if ($pl['invise'] == 1) {
$userslist = $this->u->isModerator() ? $tm : '';
$tm = '<span style="color:maroon">' . $this->u->getLogin($pl['creator']) . '</span>' .
$tm = '<span style="color:maroon">' . User::getLogin($pl['creator']) . '</span>' .
$userslist . ' - <i>невидимый</i>';
$unvs = ' Участников: ' . $cols . ' чел. ';
$n1tv .= ' <img src="' . Config::img() . '/i/fighttypehidden0.gif" title="Невидимый">';
@@ -1143,9 +1143,9 @@ class FightRequest
$tmc = [];
$users = Db::getRows('select team, id from stats where zv = ?', [$pl['id']]);
foreach ($users as $user) {
${'tm' . $user['team']} .= $this->u->getLogin($user['id']) . ', ';
${'tm' . $user['team']} .= User::getLogin($user['id']) . ', ';
$tmc[$user['team']]++;
$teams[$user['team']][] = $this->u->getLogin($user['id']);
$teams[$user['team']][] = User::getLogin($user['id']);
}
foreach ($teams as $id => $members) {