Fixes non-referenced use of User, which would have led to a performance impact.
[platal.git] / modules / carnet.php
index 1d72774..a7fbc04 100644 (file)
@@ -245,7 +245,7 @@ class CarnetModule extends PLModule
             require_once 'userset.inc.php';
             $base = 'carnet/contacts/search';
 
-            require_once(dirname(__FILE__) . '/search/classes.inc.php');
+            Platal::load('search', 'classes.inc.php');
             ThrowError::$throwHook = array($this, 'searchErrorHandler');
             $view = new SearchSet(true, false, "INNER JOIN contacts AS c2 ON (u.user_id = c2.contact)", "c2.uid = $uid");
         } else {
@@ -263,7 +263,7 @@ class CarnetModule extends PLModule
 
     function handler_pdf(&$page, $arg0 = null, $arg1 = null)
     {
-        require_once dirname(__FILE__).'/carnet/contacts.pdf.inc.php';
+        $this->load('contacts.pdf.inc.php');
         require_once 'user.func.inc.php';
 
         Platal::session()->close();
@@ -298,12 +298,9 @@ class CarnetModule extends PLModule
 
     function handler_rss(&$page, $user = null, $hash = null)
     {
-        require_once 'rss.inc.php';
-        require_once 'notifs.inc.php';
-
-        $uid    = init_rss('carnet/rss.tpl', $user, $hash);
-        $notifs = new Notifs($uid, false);
-        $page->assign('notifs', $notifs);
+        $this->load('feed.inc.php');
+        $feed = new CarnetFeed();
+        return $feed->run($page, $user, $hash);
     }
 
     function handler_ical(&$page, $alias = null, $hash = null)