-Subproject commit a794b0bd619df7b333018eb8435f755032ea4e8b
+Subproject commit e94c4a1713cc0d63508a5d0ecd2d572f047975fb
parent::__construct($_user, false, 'medal', $_stamp);
$this->mid = $_idmedal;
$this->gid = $_subidmedal;
+ if (is_null($this->gid)) {
+ $this->gid = 0;
+ }
}
// }}}
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);
}
// }}}
"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,
<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}
<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}