$banana is the only global variable !
[banana.git] / include / banana.inc.php.in
index 4e25e7d..766830c 100644 (file)
@@ -11,7 +11,6 @@ require_once("include/misc.inc.php");
 require_once("include/groups.inc.php");
 require_once("include/format.inc.php");
 require_once("include/error.inc.php");
-require_once("include/post.inc.php");
 
 class Banana
 {
@@ -38,6 +37,7 @@ class Banana
     
     var $nntp;
     var $spool;
+    var $post;
 
     function Banana()
     {
@@ -55,6 +55,12 @@ class Banana
         if (!$this->spool) { error('nntpspool'); }
     }
 
+    function newPost($id)
+    {
+        require_once("include/post.inc.php");
+        $this->post = new BananaPost($id);
+    }
+
     function _setupProfile()
     {
         if (function_exists('hook_getprofile')) {