Happy New Year
[platal.git] / classes / plfeed.php
index cd2d469..7d660e5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -69,7 +69,7 @@ abstract class PlFeed implements PlIterator
 
     /** Fetch the feed for the given user.
      */
-    abstract protected function fetch($user);
+    abstract protected function fetch(PlUser &$user);
 
     public function next()
     {
@@ -100,7 +100,7 @@ abstract class PlFeed implements PlIterator
         $user = Platal::session()->tokenAuth($login, $token);
         if (empty($user)) {
             if ($require_auth) {
-                $page->kill("Authentication required");
+                return PL_FORBIDDEN;
             } else {
                 $user = null;
             }