From 90a65bcc43455b578ab69350a31a01419e7a0a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20G=C3=B6tzinger?= Date: Sun, 1 Feb 2015 11:41:02 +0100 Subject: [PATCH] =?UTF-8?q?Fehler=20bei=20eigenen=20Beschreibungstexten=20?= =?UTF-8?q?f=C3=BCr=20Rating=20behoben.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/RateItFrontend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/RateItFrontend.php b/classes/RateItFrontend.php index d647c87..00ae9cf 100644 --- a/classes/RateItFrontend.php +++ b/classes/RateItFrontend.php @@ -115,7 +115,7 @@ class RateItFrontend extends \Hybrid $this->loadLanguageFile('default'); $stars = $this->percentToStars($rating['rating']); preg_match('/^.*\[(.+)\|(.+)\].*$/i', $GLOBALS['TL_CONFIG']['rating_description'], $labels); - if (!is_array($labels) || !count($labels) == 2 || !count($labels) == 3) { + if (!is_array($labels) && (!count($labels) == 2 || !count($labels) == 3)) { $label = ($rating[totalRatings] > 1 || $rating[totalRatings] == 0) || !$rating ? $GLOBALS['TL_LANG']['rateit']['rating_label'][1] : $GLOBALS['TL_LANG']['rateit']['rating_label'][0]; $description = '%current%/%max% %type% (%count% ['.$GLOBALS['TL_LANG']['tl_rateit']['vote'][0].'|'.$GLOBALS['TL_LANG']['tl_rateit']['vote'][1].'])'; } else {