From 34d09b54693ccdb9d3406be162826498bc5d54cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 7 Jun 2010 16:12:50 +0200 Subject: [PATCH] Actually takes into account modification on corps when the profile previously had no corps. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/profile/jobs.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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()); } -- 2.1.4