- require_once 'notifs.inc.php';
- register_watch_op($this->user->id(), WATCH_FICHE, '', 'medals');
- return XDB::execute('REPLACE INTO profile_medals_sub
- VALUES ({?}, {?}, {?})',
- $this->user->id(), $this->mid,
+ return XDB::execute('INSERT INTO profile_medals (pid, mid, gid)
+ VALUES ({?}, {?}, {?})
+ ON DUPLICATE KEY UPDATE gid = VALUES(gid)',
+ $this->profile->id(), $this->mid,