Converts Banana to the new forlife/hruid scheme.
[platal.git] / include / validations / evts.inc.php
index a1a3985..f409530 100644 (file)
@@ -96,12 +96,12 @@ class EvtReq extends Validate
         if (@$_FILES['image']['tmp_name']) {
             $upload = PlUpload::get($_FILES['image'], S::v('forlife'), 'event');
             if (!$upload) {
-                $this->trig("Impossible de télécharger le fichier");
+                $this->trigError("Impossible de télécharger le fichier");
             } elseif (!$upload->isType('image')) {
-                $page->trig('Le fichier n\'est pas une image valide au format JPEG, GIF ou PNG');
+                $page->trigError('Le fichier n\'est pas une image valide au format JPEG, GIF ou PNG');
                 $upload->rm();
             } elseif (!$upload->resizeImage(200, 300, 100, 100, 32284)) {
-                $page->trig('Impossible de retraiter l\'image');
+                $page->trigError('Impossible de retraiter l\'image');
             } else {
                 $this->readImage($upload);
             }
@@ -147,10 +147,8 @@ class EvtReq extends Validate
             }
             global $globals;
             if ($globals->banana->event_forum) {
-                require_once 'user.func.inc.php';
-                $forlife = get_user_forlife($this->uid);
                 require_once 'banana/forum.inc.php';
-                $banana = new ForumsBanana($forlife);
+                $banana = new ForumsBanana(User::getSilent($this->uid));
                 $post = $banana->post($globals->banana->event_forum,
                                       $globals->banana->event_reply,
                                       $this->titre, MiniWiki::wikiToText($this->texte, false, 0, 80));