From: Stéphane Jacob Date: Fri, 18 Feb 2011 14:20:29 +0000 (+0100) Subject: Only stores required profile modifications. X-Git-Tag: xorg/1.1.0~1^2~19 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=6ccad32e53df0b30d5d5a063744bf19770289178;p=platal.git Only stores required profile modifications. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index dd20de4..2bc4c52 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -306,7 +306,7 @@ abstract class ProfilePage implements PlWizardPage $user = S::user(); if ($owner->isActive()) { foreach ($changedFields as $field => $values) { - if (!is_null($field)) { + if (in_array($field, Profile::$descriptions)) { XDB::execute('INSERT INTO profile_modifications (pid, uid, field, oldText, newText, type, timestamp) VALUES ({?}, {?}, {?}, {?}, {?}, {?}, NOW()) ON DUPLICATE KEY UPDATE uid = VALUES(uid), oldText = IF(VALUES(type) != type, VALUES(oldText), oldText),