closes bug 238 : liens et mails cliquables dans les evenements
authorPascal Corpet <pascal.corpet@m4x.org>
Fri, 14 Jan 2005 12:44:07 +0000 (12:44 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:32 +0000 (23:27 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-314

ChangeLog
htdocs/evenements.php

index 9b69fd7..3c82e64 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,9 @@ Bug/Wish :
        * Emails :
                - #229: Possibility to show our melix address.                                          -Car
 
+       * Events :
+               - #238: Links and Mailto are now active.                                                        -Car
+
        * Marketing :
                - #256: Mail are now correctly sent.                                                            -MC
 
index e92a946..b3c3795 100644 (file)
@@ -39,6 +39,8 @@ $page->assign('validation_message', $validation_message);
 $page->assign('action', strtolower($action));
 
 if ($action=="Confirmer") {
+    $texte = preg_replace( "/((http|ftp)+(s)?:\/\/[^<>\s]+)/i", "<a href=\"\\0\">\\0</a>", $texte );
+    $texte = preg_replace( "/([^,\s]+@[^,\s]+)/i", "<a href=\"mailto:\\0\">\\0</a>", $texte );
     require_once("validations.inc.php");
     $evtreq = new evtreq($titre, $texte, $promo_min, $promo_max,
             $peremption, $validation_message, Session::getInt('uid'));