Actualiser api.php
This commit is contained in:
@@ -336,7 +336,7 @@ switch ($action) {
|
|||||||
$result = $pdo->query($sql)->fetchAll();
|
$result = $pdo->query($sql)->fetchAll();
|
||||||
|
|
||||||
// Formatage des notes : suppression du .0 pour les comptes ronds
|
// Formatage des notes : suppression du .0 pour les comptes ronds
|
||||||
foreach ($result as &$row) {
|
foreach ($result as $row) {
|
||||||
if ($row['rating'] !== null) {
|
if ($row['rating'] !== null) {
|
||||||
$ratingVal = (float)$row['rating'];
|
$ratingVal = (float)$row['rating'];
|
||||||
$row['rating'] = ($ratingVal == floor($ratingVal)) ? (int)$ratingVal : $ratingVal;
|
$row['rating'] = ($ratingVal == floor($ratingVal)) ? (int)$ratingVal : $ratingVal;
|
||||||
|
|||||||
Reference in New Issue
Block a user