Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Added rounded integer rating
givanz6b790afe6a56
diff --git a/app/component/reviews.php b/app/component/reviews.phpindex d3ef806..938a673 100755--- a/app/component/reviews.php+++ b/app/component/reviews.php@@ -40,8 +40,8 @@ class Reviews extends Comments {'status' => 1, //approved reviews'start' => 0,'limit' => 10,- 'image_size' => 'thumb','order' => 'asc', //desc+ 'image_size' => 'thumb', //options: xlarge, large, medium, thumb];public $cacheExpire = 0; //no cache@@ -81,7 +81,8 @@ class Reviews extends Comments {$results += $stats;}- $results['rating'] = number_format($results['rating'] ?? 0, 1);+ $results['rating'] = number_format($results['rating'] ?? 0, 1);+ $results['rating_int'] = ceil($results['rating']);//compute width and fill missing ratingsforeach ([1, 2, 3, 4, 5] as $rating) {