diff --git a/views/pages/Photo.php b/views/pages/Photo.php index 0e9ca32..bb63026 100644 --- a/views/pages/Photo.php +++ b/views/pages/Photo.php @@ -334,8 +334,9 @@ if ($photo->i('id') !== null) { $photo->i('entitydata_id')))[0]; $vehiclevariables = json_decode($vehicle->i('sampledata'), true); - $vehicledatavariables = json_decode($vehicle->i('content'), true); + $vehicledatavariables = json_decode($entity['content'], true); $num = 1; foreach ($vehiclevariables as $vb) { echo ' diff --git a/views/pages/Vehicle.php b/views/pages/Vehicle.php index 8b4b9aa..113ca6a 100644 --- a/views/pages/Vehicle.php +++ b/views/pages/Vehicle.php @@ -49,7 +49,7 @@ $vehicledatavariables = json_decode($data['content'], true); foreach ($photos as $p) { $author = new User($p['user_id']); echo '
-
678 КБ +678 КБ
'; if (DB::query('SELECT COUNT(*) FROM photos_comments WHERE photo_id=:id', array(':id'=>$p['id']))[0]['COUNT(*)'] >= 1) { echo '
'.DB::query('SELECT COUNT(*) FROM photos_comments WHERE photo_id=:id', array(':id'=>$p['id']))[0]['COUNT(*)'].'
';