<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

class top_news_main extends ModuleTools
{
	public function __construct()
	{
		$module=Factory::create('news.module');
		$filter=array(
			'lang_id'=>LabCMS::i()->lang['id']
		);
		$order=array('date'=>'desc', 'new_id'=>'desc');
		$news=$module->getNewsByFilter($filter, $order, config::get('top_news'), 1);
		self::_assign('top_news', $news['collection']);
	}
}