diff --git a/Plugins/Mineplex.ReportServer/web/view.php b/Plugins/Mineplex.ReportServer/web/view.php index 7891fd4f3..8458bf8a7 100644 --- a/Plugins/Mineplex.ReportServer/web/view.php +++ b/Plugins/Mineplex.ReportServer/web/view.php @@ -262,6 +262,24 @@ function getReporters($reportId) return $reportReasons; } +/** + * @param Snapshot $snapshot + * @param Report $report + * @return User[] + */ +function getInvolvedUsers($snapshot, $report) +{ + $involvedUsers = $snapshot->getPlayers(); + $involvedUsers[$report->getSuspect()->getId()] = $report->getSuspect(); + + /** @var User $reporter */ + foreach ($report->getReporters() as $reporter) { + $involvedUsers[$reporter->getId()] = $reporter; + } + + return $involvedUsers; +} + /** * @param Message $messageA * @param Message $messageB @@ -422,6 +440,8 @@ if ($validId) $reporterUsernames[count($reporterUsernames)] = $reporter->getUsername(); } + $involvedUsers = getInvolvedUsers($snapshot, $report); + // TODO Calculate time since last report // TODO actually calculate time $lastReportTime = new DateTime('1999-01-12'); @@ -487,10 +507,10 @@ if ($validId)

   Users


- getPlayers() as $player): ?> - -   getUsername() ?> getRank() ?>
  - getUUID() ?> + + +   getUsername() ?> getRank() ?>
  + getUUID() ?>