New script for formatting AX education.
[platal.git] / modules / xnetgrp / feed.inc.php
index d7a30d3..95b421c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -75,19 +75,19 @@ class XnetGrpEventFeed extends PlFeed
         global $globals;
         if (!is_null($user)) {
             return new UserFilterIterator(
-                   XDB::iterator("SELECT  a.id, a.titre AS title, a.texte, a.contacts,
-                                          a.create_date AS publication,
-                                          FIND_IN_SET('photo', a.flags) AS photo,
-                                          CONCAT({?}, '/#art', a.id) AS link
-                                    FROM  #groupex#.announces AS a
-                                   WHERE  peremption >= NOW() AND a.asso_id = {?}",
+                   XDB::iterator("SELECT  id, titre AS title, texte, contacts,
+                                          create_date AS publication,
+                                          FIND_IN_SET('photo', flags) AS photo,
+                                          CONCAT({?}, '/#art', id) AS link
+                                    FROM  group_announces
+                                   WHERE  expiration >= NOW() AND asso_id = {?}",
                                    $this->link, $globals->asso('id'), $user));
         } else {
-            return  XDB::iterator("SELECT  a.id, a.titre AS title, a.texte, a.create_date AS publication,
-                                           CONCAT({?}, '/#art', a.id) AS link,
+            return  XDB::iterator("SELECT  id, titre AS title, texte, create_date AS publication,
+                                           CONCAT({?}, '/#art', id) AS link,
                                            NULL AS photo, NULL AS contacts
-                                     FROM  #groupex#.announces AS a
-                                    WHERE  FIND_IN_SET('public', a.flags) AND peremption >= NOW() AND a.asso_id = {?}",
+                                     FROM  group_announces
+                                    WHERE  FIND_IN_SET('public', flags) AND expiration >= NOW() AND asso_id = {?}",
                                   $this->link, $globals->asso('id'));
         }
     }