Fix wiki text in RSS
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 23 Oct 2007 19:24:52 +0000 (21:24 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 23 Oct 2007 19:24:52 +0000 (21:24 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/events.php
templates/events/rss.tpl

index 9c4f079..2103a17 100644 (file)
@@ -253,7 +253,8 @@ class EventsModule extends PLModule
 
         $rss = XDB::iterator(
                 'SELECT  e.id, e.titre, e.texte, e.creation_date, e.post_id, p.attachmime IS NOT NULL AS photo,
-                         IF(u2.nom_usage = "", u2.nom, u2.nom_usage) AS nom, u2.prenom, u2.promo
+                         IF(u2.nom_usage = "", u2.nom, u2.nom_usage) AS nom, u2.prenom, u2.promo,
+                         FIND_IN_SET(\'wiki\', e.flags) AS wiki
                    FROM  auth_user_md5   AS u
              INNER JOIN  evenements      AS e ON ( (e.promo_min = 0 || e.promo_min <= u.promo)
                                                  AND (e.promo_max = 0 || e.promo_max >= u.promo) )
index 30faf33..1d2aab9 100644 (file)
@@ -43,7 +43,7 @@
           <img src="{#globals.baseurl#}/events/photo/{$line.id}" alt="{$line.title}" />
         </div>
         {/if}
-        <div>{$line.texte}</div>
+        <div>{if $line.wiki}{$line.texte|miniwiki}{else}{$line.texte}{/if}</div>
         {if $line.post_id neq -1}
         <div style="clear: both">
           <br />