public function __construct()
 {
     parent::__construct();
     if ($GLOBALS['perm']->have_perm("autor")) {
         $topicon = new Navigation(_("Lernmaterialien"), PluginEngine::getURL($this, array(), "market/overview"));
         $topicon->setImage(Icon::create('service', 'navigation'));
         Navigation::addItem("/lernmarktplatz", $topicon);
         Navigation::addItem("/lernmarktplatz/overview", new Navigation(_("Lernmarktplatz"), PluginEngine::getURL($this, array(), "market/overview")));
         Navigation::addItem("/lernmarktplatz/mymaterial", new Navigation(_("Meine Materialien"), PluginEngine::getURL($this, array(), "mymaterial/overview")));
     }
     if ($GLOBALS['perm']->have_perm("root")) {
         $tab = new Navigation(_("Lernmarktplatz"), PluginEngine::getURL($this, array(), "admin/hosts"));
         Navigation::addItem("/admin/config/lernmarktplatz", $tab);
     }
     if (UpdateInformation::isCollecting() && stripos(Request::get("page"), "plugins.php/lernmarktplatz/market/discussion/") !== false) {
         $data = Request::getArray("page_info");
         $last_update = Request::get("server_timestamp", time() - 30);
         $review_id = $data['Lernmarktplatz']['review_id'];
         $output = array('comments' => array());
         $comments = LernmarktplatzComment::findBySQL("review_id = :review_id AND mkdate >= :last_update ORDER BY mkdate ASC", array('last_update' => $last_update, 'review_id' => $review_id));
         $tf = new Flexi_TemplateFactory(__DIR__ . "/views");
         foreach ($comments as $comment) {
             $template = $tf->open("market/_comment.php");
             $template->set_attribute('comment', $comment);
             $output['comments'][] = array('comment_id' => $comment->getId(), 'html' => $template->render());
         }
         UpdateInformation::setInformation("Lernmarktplatz.update", $output);
     }
 }