Can configure spool root
[banana.git] / banana / nntp.inc.php
index 3b02c86..6f5d245 100644 (file)
@@ -103,6 +103,7 @@ class BananaNNTP extends BananaNNTPCore implements BananaProtocoleInterface
      */
     public function &getMessage($id)
     {
+        $message = null;
         if (is_numeric($id) && Banana::$group != $this->ingroup) {
             if (is_null(Banana::$spool)) {
                 $this->group(Banana::$group);
@@ -113,9 +114,9 @@ class BananaNNTP extends BananaNNTPCore implements BananaProtocoleInterface
         }
         $data = $this->article($id);
         if ($data !== false) {
-            return new BananaMessage($data);
+            $message = new BananaMessage($data);
         }
-        return null;
+        return $message;
     }
 
     /** Return the sources of the message
@@ -134,7 +135,8 @@ class BananaNNTP extends BananaNNTPCore implements BananaProtocoleInterface
         if ($data !== false) {
             return implode("\n", $data);
         }
-        return null;
+        $data = null;
+        return $data;
     }
 
     /** Return the indexes of the messages presents in the Box
@@ -252,5 +254,5 @@ class BananaNNTP extends BananaNNTPCore implements BananaProtocoleInterface
     }
 }
 
-// vim:set et sw=4 sts=4 ts=4:
+// vim:set et sw=4 sts=4 ts=4 enc=utf-8:
 ?>