From: Stéphane Jacob Date: Mon, 7 Jun 2010 14:12:50 +0000 (+0200) Subject: Actually takes into account modification on corps when the profile previously had... X-Git-Tag: xorg/1.0.0~156 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=34d09b54693ccdb9d3406be162826498bc5d54cb;p=platal.git Actually takes into account modification on corps when the profile previously had no corps. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index 14f1051..61d80bb 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -463,10 +463,8 @@ class ProfileSettingJobs extends ProfilePage } if ($this->changed['corps']) { - XDB::execute("UPDATE profile_corps - SET original_corpsid = {?}, current_corpsid = {?}, - rankid = {?}, corps_pub = {?} - WHERE pid = {?}", + XDB::execute('REPLACE INTO profile_corps (original_corpsid, current_corpsid, rankid, corps_pub, pid) + VALUES ({?}, {?}, {?}, {?}, {?})', $this->values['corps']['original'], $this->values['corps']['current'], $this->values['corps']['rank'], $this->values['corps']['pub'], $this->pid()); }