PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.17
Yatra – Travel Booking & Tour Operator Software v3.0.17
3.0.17 3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 All 85 releases
← All changes | templates/partials/single-trip/reviews.php +5 -5 3.0.11 → 3.0.17 View file →
@@ -67,13 +67,13 @@
67 67 <span class="yatra-rating-max">/5</span>
68 68 </div>
69 69 <div class="yatra-overall-stars">
70 70 <?php
71 - // 0.5, matching the booking confirmation page. This used to
72 - // round at 0.3, so a 4.3 trip showed 4.5 stars here but 4.0
73 - // on the confirmation page for the very same rating.
74 - $full_stars = (int) floor($avg_rating);
75 - $has_half = ($avg_rating - $full_stars) >= 0.5;
71 + // Same helper as the confirmation page and listing cards, so a
72 + // rating never renders differently on two screens.
73 + $star_parts = yatra_rating_star_parts($avg_rating);
74 + $full_stars = $star_parts['full'];
75 + $has_half = $star_parts['half'];
76 76 for ($i = 1; $i <= 5; $i++):
77 77 if ($i <= $full_stars):
78 78 ?>
79 79 <span class="yatra-star-icon filled">★</span>