Merge commit 'origin/master' into fusionax
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 22 Feb 2009 14:02:47 +0000 (15:02 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 22 Feb 2009 14:02:47 +0000 (15:02 +0100)
core
htdocs/images/medals/onorificenza_quadro.jpg [new file with mode: 0644]
include/validations/medals.inc.php
modules/xnetevents/xnetevents.inc.php
templates/xnetgrp/annuaire-admin.tpl

diff --git a/core b/core
index a794b0b..e94c4a1 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit a794b0bd619df7b333018eb8435f755032ea4e8b
+Subproject commit e94c4a1713cc0d63508a5d0ecd2d572f047975fb
diff --git a/htdocs/images/medals/onorificenza_quadro.jpg b/htdocs/images/medals/onorificenza_quadro.jpg
new file mode 100644 (file)
index 0000000..759f301
Binary files /dev/null and b/htdocs/images/medals/onorificenza_quadro.jpg differ
index 0bc892c..e448358 100644 (file)
@@ -36,6 +36,9 @@ class MedalReq extends Validate
         parent::__construct($_user, false, 'medal', $_stamp);
         $this->mid = $_idmedal;
         $this->gid = $_subidmedal;
+        if (is_null($this->gid)) {
+            $this->gid = 0;
+        }
     }
 
     // }}}
@@ -104,7 +107,8 @@ class MedalReq extends Validate
         register_watch_op($this->user->id(), WATCH_FICHE, '', 'medals');
         return XDB::execute('REPLACE INTO  profile_medals_sub
                                    VALUES  ({?}, {?}, {?})',
-                            $this->user->id(), $this->mid, $this->gid);
+                            $this->user->id(), $this->mid,
+                            is_null($this->gid) ? 0 : $this->gid);
     }
 
     // }}}
index 45db5b5..fd17320 100644 (file)
@@ -31,7 +31,7 @@ function get_event_detail($eid, $item_id = false, $asso_id = null)
         "SELECT SUM(nb) AS nb_tot, COUNT(DISTINCT ep.uid) AS nb, e.*,
                 IF(e.deadline_inscription, e.deadline_inscription >= LEFT(NOW(), 10),
                    1) AS inscr_open,
-                LEFT(10, e.debut) AS start_day, LEFT(10, e.fin) AS last_day,
+                LEFT(10, e.debut) AS first_day, LEFT(10, e.fin) AS last_day,
                 LEFT(NOW(), 10) AS now,
                 ei.titre,
                 al.vid AS absent_list, pl.vid AS participant_list,
index 41e6ece..5afe6b5 100644 (file)
@@ -26,7 +26,7 @@
 
 <ul>
   {foreach from=$not_in_group_x item=n}
-  <li>{$n} [<a href='{$platal->ns}member/new/{$n}' class='popup'>l'inscrire</a>]</li>
+  <li>{$n} [<a href='{$platal->ns}member/new/{$n}?token={xsrf_token}' class='popup'>l'inscrire</a>]</li>
   {foreachelse}
   <li><em>tous les polytechniciens présents sur les listes sont inscrits à l'annuaire du groupe.</em></li>
   {/foreach}
@@ -35,7 +35,7 @@
 <h2>Non polytechniciens</h2>
 <ul>
   {foreach from=$not_in_group_ext item=n}
-  <li>{$n} [<a href='{$platal->ns}member/new/{$n}' class='popup'>l'inscrire</a>]</li>
+  <li>{$n} [<a href='{$platal->ns}member/new/{$n}?token={xsrf_token}' class='popup'>l'inscrire</a>]</li>
   {foreachelse}
   <li><em>tous les non-polytechniciens présents sur les listes sont inscrits à l'annuaire du groupe.</em></li>
   {/foreach}