mostly code simplifications.
[platal.git] / modules / events.php
index b244729..4e0ca1e 100644 (file)
@@ -118,10 +118,10 @@ class EventsModule extends PLModule
         // puis par dates croissantes d'expiration
         $promo = Session::getInt('promo');
         $sql = "SELECT  e.id,e.titre,e.texte,a.user_id,a.nom,a.prenom,a.promo,l.alias AS forlife
-                  FROM  evenements    AS e
-            INNER JOIN  auth_user_md5 AS a ON e.user_id=a.user_id
-            INNER JOIN  aliases       AS l ON ( a.user_id=l.id AND l.type='a_vie' )
-            LEFT JOIN   evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
+                  FROM  evenements     AS e
+            INNER JOIN  auth_user_md5  AS a ON e.user_id=a.user_id
+            INNER JOIN  aliases        AS l ON ( a.user_id=l.id AND l.type='a_vie' )
+             LEFT JOIN  evenements_vus AS ev ON (e.id = ev.evt_id AND ev.user_id = {?})
                  WHERE  FIND_IN_SET(e.flags, 'valide') AND peremption >= NOW()
                         AND (e.promo_min = 0 || e.promo_min <= {?})
                         AND (e.promo_max = 0 || e.promo_max >= {?})
@@ -143,8 +143,6 @@ class EventsModule extends PLModule
                       $globals->xdb->iterator($sql, Session::getInt('uid'),
                                               $promo, $promo)
                      );
-
-        return PL_OK;
     }
 
     function handler_ev_submit(&$page)
@@ -195,8 +193,6 @@ class EventsModule extends PLModule
             $select .= "> $day / $month / $year</option>\n";
         }
         $page->assign('select',$select);
-
-        return PL_OK;
     }
 
     function handler_nl(&$page, $action = null)
@@ -214,8 +210,6 @@ class EventsModule extends PLModule
 
         $page->assign('nls', get_nl_state());
         $page->assign_by_ref('nl_list', get_nl_list());
-
-        return PL_OK;
     }
 
     function handler_nl_show(&$page, $nid = 'last')
@@ -232,8 +226,6 @@ class EventsModule extends PLModule
                         Session::get('bestalias'), Session::get('femme'),
                         Session::get('mail_fmt') != 'text');
         }
-
-        return PL_OK;
     }
 
     function handler_nl_submit(&$page)
@@ -252,8 +244,6 @@ class EventsModule extends PLModule
             $art->submit();
             $page->assign('submited', true);
         }
-
-        return PL_OK;
     }
 }