From b7ab465486746830505e1707477c99f9d33c299f Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Sun, 21 Jul 2024 03:04:22 +0300 Subject: [PATCH] Update Photo.php --- views/pages/Photo.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/views/pages/Photo.php b/views/pages/Photo.php index c0dc5cc..daf9175 100644 --- a/views/pages/Photo.php +++ b/views/pages/Photo.php @@ -6,6 +6,13 @@ use App\Models\{User, Vote, Comment}; $id = explode('/', $_SERVER['REQUEST_URI'])[2]; $photo = new \App\Models\Photo($id); if ($photo->i('id') !== null) { + if ($photo->content('video') != 'null') { + $extname = 'видео'; + $extnamef = 'видеоролик'; + } else { + $extname = 'фото'; + $extnamef = 'фотография'; + } $photouser = new \App\Models\User($photo->i('user_id')); if ($photo->i('moderated') === 0) { if ($photo->i('user_id') === Auth::userid() || $user->i('admin') > 0) { @@ -77,8 +84,8 @@ if ($photo->i('id') !== null) { i('moderated') === 0 && $moderated === true) { echo '