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 '