move banana things into the banana module.
[platal.git] / modules / banana.php
index 3dab3d1..63234c2 100644 (file)
@@ -66,7 +66,7 @@ class BananaModule extends PLModule
 
         if (!(Post::has('action') && Post::has('banananame') && Post::has('bananasig')
         && Post::has('bananadisplay') && Post::has('bananamail')
-        && Post::has('bananaupdate') && Post::get('action')=="OK" ))
+        && Post::has('bananaupdate') && Post::v('action')=="OK" ))
         {
             $req = XDB::query("
                 SELECT  nom,mail,sig,if(FIND_IN_SET('threads',flags),'1','0'),
@@ -89,10 +89,10 @@ class BananaModule extends PLModule
             XDB::execute(
                 'REPLACE INTO  forums.profils (uid,sig,mail,nom,flags)
                        VALUES  ({?},{?},{?},{?},{?})',
-                S::v('uid'), Post::get('bananasig'),
-                Post::get('bananamail'), Post::get('banananame'),
-                (Post::getBool('bananadisplay') ? 'threads,' : '') .
-                (Post::getBool('bananaupdate') ? 'automaj' : '')
+                S::v('uid'), Post::v('bananasig'),
+                Post::v('bananamail'), Post::v('banananame'),
+                (Post::b('bananadisplay') ? 'threads,' : '') .
+                (Post::b('bananaupdate') ? 'automaj' : '')
             );
         }
     }
@@ -116,7 +116,7 @@ class BananaModule extends PLModule
         $page->addCssLink('css/banana.css');
         $page->assign('xorg_title','Polytechnique.org - Forums & PA');
 
-        require_once('banana.inc.php');
+        require_once dirname(__FILE__).'/banana/banana.inc.php';
 
         $res = PlatalBanana::run($params);
         $page->assign_by_ref('banana', $banana);