Converts Banana to the new forlife/hruid scheme.
[platal.git] / include / banana / moderate.inc.php
index 1cb8b41..688bc94 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -25,7 +25,7 @@ require_once 'banana/hooks.inc.php';
 
 function hook_checkcancel($_headers)
 {
-    return ($_headers['x-org-id'] == S::v('forlife') or S::has_perms());
+    return ($_headers['x-org-id'] == S::v('hruid') or S::has_perms());
 }
 
 function hook_makeLink($params)
@@ -57,7 +57,7 @@ class ModerationBanana extends Banana
     static public $domain;
     static public $client;
 
-    function __construct($forlife, $params = null)
+    function __construct(User &$user, $params = null)
     {
         global $globals;
         ModerationBanana::$client = $params['client'];
@@ -91,7 +91,7 @@ class ModerationPage extends BananaPage
     {
         global $page;
         if ($page) {
-            $page->trig($msg);
+            $page->trigError($msg);
         }
         return true;
     }