<?php
class RSSView extends View
{
    function fetch()
    {
        $pages = $this->pages->get_pages(array('visible'=>1));
        foreach($pages AS $p)
        {
            if(empty($p->body))
                unset($pages[$p->id]);

            $p->added = date("D, d M Y H:i:s \+0300", strtotime($p->updated));
        }
        $this->design->assign("pages", $pages);

        $content = $this->design->fetch("system/rss.tpl");
        $this->request->set_header('xml');
        exit($content);
    }
}
