From 0c14aeb391f220c571bcdad813795bcbc2c30961 Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Fri, 19 Jul 2024 00:59:51 +0300 Subject: [PATCH] fix photo view by photomoderator --- views/pages/Admin/General.php | 2 ++ views/pages/Photo.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/views/pages/Admin/General.php b/views/pages/Admin/General.php index 095d7d6..13d6a30 100644 --- a/views/pages/Admin/General.php +++ b/views/pages/Admin/General.php @@ -10,6 +10,7 @@ use \App\Models\User; Никнейм Почта Прямая загрузка + Ссылка @@ -29,6 +30,7 @@ use \App\Models\User; '.$u['username'].' '.$u['email'].' '.$prem.' + https://'.$_SERVER['SERVER_NAME'].'/author/'.$u['id'].'
Редактировать
'; } diff --git a/views/pages/Photo.php b/views/pages/Photo.php index 21e1bcb..2dce741 100644 --- a/views/pages/Photo.php +++ b/views/pages/Photo.php @@ -8,7 +8,7 @@ $photo = new \App\Models\Photo($id); if ($photo->i('id') !== null) { $photouser = new \App\Models\User($photo->i('user_id')); if ($photo->i('moderated') === 0) { - if ($photo->i('user_id') === Auth::userid()) { + if ($photo->i('user_id') === Auth::userid() || $user->i('admin') > 0) { $moderated = true; } else { $moderated = false;