Centralize the getCount function.

This commit is contained in:
Sébastien Lucas 2014-05-30 06:47:38 +02:00
parent 70611e5c50
commit 4be0366a0a
7 changed files with 24 additions and 34 deletions

View file

@ -30,11 +30,8 @@ class Rating extends Base {
}
public static function getCount() {
$nRatings = parent::executeQuerySingle ('select count(*) from ratings');
$entry = new Entry (localize("ratings.title"), self::ALL_RATING_ID,
str_format (localize("ratings", $nRatings), $nRatings), "text",
array ( new LinkNavigation ("?page=".parent::PAGE_ALL_RATINGS)));
return $entry;
// str_format (localize("ratings", count(array))
return parent::getCountGeneric ("ratings", self::ALL_RATING_ID, parent::PAGE_ALL_RATINGS, "ratings");
}
public static function getAllRatings() {