diff options
author | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-06-18 05:39:39 +0000 |
---|---|---|
committer | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-06-18 05:39:39 +0000 |
commit | 91eab2086875ad35aa93af00fc8b37d039d9f93c (patch) | |
tree | d3ba5609011f7aff139d6ae07004d14f40811600 | |
parent | a2836c9af951a4371833a5daa3afdb78013abab0 (diff) | |
download | ampache-91eab2086875ad35aa93af00fc8b37d039d9f93c.tar.gz ampache-91eab2086875ad35aa93af00fc8b37d039d9f93c.tar.bz2 ampache-91eab2086875ad35aa93af00fc8b37d039d9f93c.zip |
Fix statistics display after recent browse changes.
-rw-r--r-- | templates/show_popular.inc.php | 30 | ||||
-rw-r--r-- | templates/show_stats_newest.inc.php | 20 |
2 files changed, 35 insertions, 15 deletions
diff --git a/templates/show_popular.inc.php b/templates/show_popular.inc.php index 26b785d1..d74fd5f5 100644 --- a/templates/show_popular.inc.php +++ b/templates/show_popular.inc.php @@ -21,13 +21,25 @@ */ ?> <?php show_box_top(_('Information')); ?> -<em><?php echo _('Songs'); ?></em> -<?php $object_ids = Stats::get_top('song'); ?> -<?php require_once Config::get('prefix') . '/templates/show_songs.inc.php'; ?> -<em><?php echo _('Albums'); ?></em> -<?php $object_ids = Stats::get_top('album'); ?> -<?php require_once Config::get('prefix') . '/templates/show_albums.inc.php'; ?> -<em><?php echo _('Artists'); ?></em> -<?php $object_ids = Stats::get_top('artist'); ?> -<?php require_once Config::get('prefix') . '/templates/show_artists.inc.php'; ?> +<?php +$object_ids = Stats::get_top('song'); +$browse = new Browse(); +$browse->set_type('song'); +$browse->show_objects($object_ids); +$browse->store(); +?> +<?php +$object_ids = Stats::get_top('album'); +$browse = new Browse(); +$browse->set_type('album'); +$browse->show_objects($object_ids); +$browse->store(); +?> +<?php +$object_ids = Stats::get_top('artist'); +$browse = new Browse(); +$browse->set_type('artist'); +$browse->show_objects($object_ids); +$browse->store(); +?> <?php show_box_bottom(); ?> diff --git a/templates/show_stats_newest.inc.php b/templates/show_stats_newest.inc.php index a4c7f523..3b1455e2 100644 --- a/templates/show_stats_newest.inc.php +++ b/templates/show_stats_newest.inc.php @@ -20,9 +20,17 @@ */ ?> -<i><?php echo _('Newest Albums'); ?></i> -<?php $object_ids = Stats::get_newest('album'); ?> -<?php require_once Config::get('prefix') . '/templates/show_albums.inc.php'; ?> -<?php $object_ids = Stats::get_newest('artist'); ?> -<i><?php echo _('Newest Artists'); ?></i> -<?php require_once Config::get('prefix') . '/templates/show_artists.inc.php'; ?> +<?php +$object_ids = Stats::get_newest('album'); +$browse = new Browse(); +$browse->set_type('album'); +$browse->show_objects($object_ids); +$browse->store(); +?> +<?php +$object_ids = Stats::get_newest('artist'); +$browse = new Browse(); +$browse->set_type('artist'); +$browse->show_objects($object_ids); +$browse->store(); +?> |