X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fpage.inc.php;h=ec70a0ea2210ec3a1b237430033cbd91e12ea552;hb=00ba8a742be0cfc70eef7c6aaaccebe7134ec087;hp=d1a1cfc2862b4a4df8a7bf5777b7e5ecbdeb5153;hpb=abd508e0a9df441fa1dac740013c8e2ab09d54cc;p=platal.git diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index d1a1cfc..ec70a0e 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -304,8 +304,9 @@ abstract class ProfilePage implements PlWizardPage $user = S::user(); if ($owner->isActive() && $owner->id() != $user->id()) { foreach ($changedFields as $field => $values) { - XDB::execute('REPLACE INTO profile_modifications (pid, uid, field, oldText, newText) - VALUES ({?}, {?}, {?}, {?}, {?})', + XDB::execute('INSERT INTO profile_modifications (pid, uid, field, oldText, newText) + VALUES ({?}, {?}, {?}, {?}, {?}) + ON DUPLICATE KEY UPDATE oldText = VALUES(oldText), newText = VALUES(newText)', $this->pid(), $user->id(), $field, $values[0], $values[1]); } }