diff options
-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(); +?> |