Merge branch 'master' into dialog
This commit is contained in:
commit
1f01b0671f
@ -27,18 +27,19 @@ class latestalbums_rss_Core {
|
|||||||
static function feed($feed_id, $offset, $limit, $id) {
|
static function feed($feed_id, $offset, $limit, $id) {
|
||||||
switch ($feed_id) {
|
switch ($feed_id) {
|
||||||
case "latest":
|
case "latest":
|
||||||
$feed->children = ORM::factory("item")
|
$feed = new stdClass();
|
||||||
|
$feed->items = ORM::factory("item")
|
||||||
->viewable()
|
->viewable()
|
||||||
->where("type", "=", "album")
|
->where("type", "=", "album")
|
||||||
->order_by("created", "DESC")
|
->order_by("created", "DESC")
|
||||||
->find_all($limit, $offset);
|
->find_all($limit, $offset);
|
||||||
|
|
||||||
$all_children = ORM::factory("item")
|
$all_items = ORM::factory("item")
|
||||||
->viewable()
|
->viewable()
|
||||||
->where("type", "=", "album")
|
->where("type", "=", "album")
|
||||||
->order_by("created", "DESC");
|
->order_by("created", "DESC");
|
||||||
|
|
||||||
$feed->max_pages = ceil($all_children->find_all()->count() / $limit);
|
$feed->max_pages = ceil($all_items->find_all()->count() / $limit);
|
||||||
$feed->title = t("Latest albums");
|
$feed->title = t("Latest albums");
|
||||||
$feed->description = t("Most recently created albums");
|
$feed->description = t("Most recently created albums");
|
||||||
return $feed;
|
return $feed;
|
||||||
|
Reference in New Issue
Block a user