Example #1
0
 function getNew()
 {
     $ago = -1;
     $where = '`a_add_time`>' . $ago . ' AND `is_deleted`=0';
     $sortings = array('a_add_time' => array('title' => 'по дате добавления', 'order' => 'desc'));
     if (Request::is_on_main_page()) {
         $this->_list($where, array(), false, $sortings);
     } else {
         $this->_list($where, $sortings);
     }
     $this->data['authors']['title'] = 'Новые авторы';
     $this->data['authors']['count'] = $this->getCountBySQL($where);
     if (Request::is_on_main_page()) {
         $this->data['authors']['link_title'] = 'Все авторы';
         $this->data['authors']['link_url'] = '/authors';
     }
 }