diff --git a/newznab/controllers/Page.php b/newznab/controllers/Page.php index 1541ce346..856d66eaf 100644 --- a/newznab/controllers/Page.php +++ b/newznab/controllers/Page.php @@ -17,10 +17,13 @@ class Page extends BasePage $role = $this->userdata["role"]; $content = new Contents(['Settings' => $this->settings]); + $f = new Forum(); $menu = new Menu($this->settings); $this->smarty->assign('menulist',$menu->get($role, $this->serverurl)); $this->smarty->assign('usefulcontentlist', $content->getForMenuByTypeAndRole(Contents::TYPEUSEFUL, $role)); $this->smarty->assign('articlecontentlist', $content->getForMenuByTypeAndRole(Contents::TYPEARTICLE, $role)); + if ($this->userdata != null) + $this->smarty->assign('recentforumpostslist',$f->getRecentPosts($this->settings->getSetting('showrecentforumposts'))); $this->smarty->assign('main_menu',$this->smarty->fetch('mainmenu.tpl')); $this->smarty->assign('useful_menu',$this->smarty->fetch('usefullinksmenu.tpl'));