From: x2003bruneau Date: Mon, 22 Jan 2007 15:32:16 +0000 (+0000) Subject: User can't remove identification footer from bug reports X-Git-Tag: xorg/0.9.13~86 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5486a0d34e21ce8e16e3539748a629603ace40de;p=platal.git User can't remove identification footer from bug reports User can't post an empty bug report git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1385 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/core.php b/modules/core.php index d0c6522..cbb1613 100644 --- a/modules/core.php +++ b/modules/core.php @@ -101,14 +101,22 @@ class CoreModule extends PLModule { $page->changeTpl('core/bug.tpl',SIMPLE); $page->addJsLink('close_on_esc.js'); - if (Env::has('send')) { + if (Env::has('send') && trim(Env::v('detailed_desc'))) { + $body = wordwrap(Env::v('detailed_desc'), 78) . "\n\n" + . "----------------------------\n" + . "Page : " . Env::v('page') . "\n\n" + . "Utilisateur : " . S::v('forlife') . "\n" + . "Navigateur : " . Env::v('browser') . "\n" + . "Skin : " . Env::v('skin') . "\n"; $page->assign('bug_sent',1); $mymail = new PlMailer(); $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@polytechnique.org>'); $mymail->addTo('support+platal@polytechnique.org'); $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary')); - $mymail->setTxtBody(Env::v('detailed_desc')); + $mymail->setTxtBody($body); $mymail->send(); + } elseif (Env::has('send')) { + $page->trig("Merci de remplir une explication du problème rencontré"); } } } diff --git a/templates/core/bug.tpl b/templates/core/bug.tpl index 49c1049..d517368 100644 --- a/templates/core/bug.tpl +++ b/templates/core/bug.tpl @@ -1,28 +1,79 @@ +{**************************************************************************} +{* *} +{* Copyright (C) 2003-2007 Polytechnique.org *} +{* http://opensource.polytechnique.org/ *} +{* *} +{* This program is free software; you can redistribute it and/or modify *} +{* it under the terms of the GNU General Public License as published by *} +{* the Free Software Foundation; either version 2 of the License, or *} +{* (at your option) any later version. *} +{* *} +{* This program is distributed in the hope that it will be useful, *} +{* but WITHOUT ANY WARRANTY; without even the implied warranty of *} +{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} +{* GNU General Public License for more details. *} +{* *} +{* You should have received a copy of the GNU General Public License *} +{* along with this program; if not, write to the Free Software *} +{* Foundation, Inc., *} +{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} +{* *} +{**************************************************************************} + + +
{if $bug_sent} {/if} -
-

Signaler un bug ou demander une amélioration

-
- -   Sujet : - -
- - -
+ +

Signaler un bug ou demander une amélioration

+
+ +   Sujet : + + + + +
+ +
+
+
+ +{* vim:set et sws=2 sts=2 sw=2: *}