function getNotices()
 {
     $pop = new Popularity();
     if (!empty($this->out->tag)) {
         $pop->tag = $this->out->tag;
     }
     $pop->limit = NOTICES_PER_SECTION;
     $pop->expiry = 1200;
     return $pop->getNotices();
 }
Exemplo n.º 2
0
 /**
  * Content area
  *
  * Shows the list of popular notices
  *
  * @return void
  */
 function showContent()
 {
     $pop = new Popularity();
     $pop->offset = ($this->page - 1) * NOTICES_PER_PAGE;
     $pop->limit = NOTICES_PER_PAGE;
     $pop->expiry = 600;
     $notice = $pop->getNotices();
     $nl = new NoticeList($notice, $this);
     $cnt = $nl->show();
     if ($cnt == 0) {
         $this->showEmptyList();
     }
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'favorited');
 }