REPLACE INTO should only be used if the data deletion is wanted.
[platal.git] / include / banana / hooks.inc.php
index 82334ea..c08c983 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -19,7 +19,8 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once 'banana/banana.inc.php';
+require_once dirname(__FILE__) . '/../../banana/banana/banana.inc.php';
+require_once dirname(__FILE__) . '/../../banana/banana/message.func.inc.php';
 
 function hook_formatDisplayHeader($_header, $_text, $in_spool = false)
 {
@@ -76,7 +77,7 @@ function hook_platalRSS($group)
     } else {
         $group = '';
     }
-    return '/rss/' . $group . S::v('hruid') . '/' . S::s('token') . '/rss.xml';
+    return '/rss/' . $group . S::v('hruid') . '/' . S::user()->token . '/rss.xml';
 }
 
 function hook_platalMessageLink($params)