diff options
Diffstat (limited to 'templates/rightbar.inc.php')
-rw-r--r-- | templates/rightbar.inc.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php index 85d935c5..bf1322e1 100644 --- a/templates/rightbar.inc.php +++ b/templates/rightbar.inc.php @@ -75,6 +75,13 @@ <?php //FIXME :: this feels kludgy $objects = $GLOBALS['user']->playlist->get_items(); + + // Limit the number of objects we show here + if (count($objects) > 100) { + $truncated = (count($objects) - 100); + $objects = array_slice($objects,0,100); + } + foreach ($objects as $uid=>$object_data) { if ($object_data['1'] == 'radio' || $object_data['1'] == 'song') { $object = new $object_data['1']($object_data['0']); @@ -92,6 +99,11 @@ <?php } if (!count($objects)) { ?> <li class="error"><?php echo _('Not Enough Data'); ?></li> <?php } ?> +<?php if ($truncated) { ?> + <li class="<?php echo flip_class(); ?>"> + <?php echo $truncated . ' ' . _('More'); ?>... + </li> +<?php } ?> </ul> |