From f50e925c3d1093ae102ff4bccdfc142c2ae50a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Thu, 27 Mar 2014 14:06:26 +0100 Subject: [PATCH] Fix wrong object in Ratings. re #137 --- rating.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rating.php b/rating.php index 1a863eb..df7a111 100644 --- a/rating.php +++ b/rating.php @@ -15,7 +15,6 @@ class Rating extends Base { const SQL_ALL_RATINGS ="select {0} from ratings, books_ratings_link where books_ratings_link.rating = ratings.id group by ratings.id order by ratings.rating"; public $id; public $name; - public $sort; public function __construct($pid, $pname) { $this->id = $pid; @@ -60,6 +59,6 @@ class Rating extends Base { public static function getRatingById ($ratingId) { $result = parent::getDb ()->prepare('select rating from ratings where id = ?'); $result->execute (array ($ratingId)); - return new Author ($ratingId, $result->fetchColumn ()); + return new Rating ($ratingId, $result->fetchColumn ()); } }