From 534f9da3d2b2644c2700050c76657d003878ed58 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 27 Dec 2005 01:31:18 +0000 Subject: fixed rating system if using non-flash --- templates/header.inc | 2 +- templates/show_object_rating.inc.php | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'templates') diff --git a/templates/header.inc b/templates/header.inc index 635330d8..d69cee63 100644 --- a/templates/header.inc +++ b/templates/header.inc @@ -45,7 +45,7 @@ $location = get_location();
Ampache v.
- username; ?> + fullname; ?>
:
diff --git a/templates/show_object_rating.inc.php b/templates/show_object_rating.inc.php index 5b95868b..91df1f15 100644 --- a/templates/show_object_rating.inc.php +++ b/templates/show_object_rating.inc.php @@ -29,19 +29,24 @@ if ($type != 'song') { $base_url = conf('web_path') . '/ratings.php?action=set_rating&mode=' . conf('flash') . '&rating_type=' . $rating->type . '&object_id=' . $rating->id . '&username=' . $GLOBALS['user']->username; $score = '0'; + /* count up to 6 */ while ($score < 6) { /* Handle the "Not rated" possibility */ - if ($score == '0' AND $score === $rating->rating) { + if ($score == '0' AND $rating->rating == '-1') { echo "\""\n"; + $found_on = true; } - elseif ($score == '0') { - echo "\n"; - echo "\t\""\n"; - echo ""; + elseif ($score == '0' AND $rating->rating == '0') { + echo "\""\n"; + $found_on = true; } - elseif ($score === $rating->rating) { + elseif ($score == $rating->rating) { echo "\""\n"; + $found_on = true; + } + elseif (!$found_on) { + echo "\n\t\""\n\n"; } else { echo "\n\t\""\n\n"; -- cgit