X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fevents.php;h=3e0ff46056c50ab0bd2840e8b6a9c7948490d0a5;hb=bc003d659f3fab8aa00cd4a284dab9c9810be7f6;hp=2439185a6dfa200d7a2053e594c1cb0351c18338;hpb=3032cbd8c5126247565d5c7cf7b705903148f476;p=platal.git diff --git a/modules/events.php b/modules/events.php index 2439185..3e0ff46 100644 --- a/modules/events.php +++ b/modules/events.php @@ -1,6 +1,6 @@ assign('valid_mesg', $valid_mesg); $page->assign('action', strtolower($action)); - if ($action == 'Confirmer') { + if ($action && (!trim($texte) || !trim($titre))) { + $page->trig("L'article doit avoir un titre et un contenu"); + } elseif ($action == 'Confirmer') { $texte = $texte_catch_url; require_once 'validations.inc.php'; $evtreq = new EvtReq($titre, $texte, $promo_min, $promo_max, @@ -228,6 +230,7 @@ class EventsModule extends PLModule function handler_tips(&$page, $tips = null) { + header('Content-Type: text/html; charset="ISO-8859-15"'); $page->changeTpl('include/tips.tpl', NO_SKIN); $page->assign('tips', $this->get_tips($tips)); } @@ -243,7 +246,7 @@ class EventsModule extends PLModule $table_editor->describe('titre', 'titre', true); $table_editor->describe('state', 'actif', true); $table_editor->describe('text', 'texte (html) de l\'astuce', false); - $table_editor->describe('priorite', 'priorité (0=min, 256=max)', false); + $table_editor->describe('priorite', '0<=priorité<=255', true); $table_editor->apply($page, $action, $id); if ($action == 'edit' && !is_null($id)) { $page->changeTpl('events/admin_tips.tpl');