123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
- }
- class PopularNoticeSection extends NoticeSection
- {
- protected $viewer;
- function __construct($out, Profile $viewer=null)
- {
- parent::__construct($out);
- $this->viewer = $viewer;
- }
- function getNotices()
- {
- $stream = new PopularNoticeStream($this->viewer);
- return $stream->getNotices(0, NOTICES_PER_SECTION + 1);
- }
- function title()
- {
-
- return _('Popular notices');
- }
- function divId()
- {
- return 'popular_section';
- }
- function moreUrl()
- {
- if (common_config('singleuser', 'enabled')) {
- $user = User::singleUser();
- common_local_url('showfavorites', array('nickname' =>
- $user->nickname));
- } else {
- return common_local_url('favorited');
- }
- }
- }
|