Only stores required profile modifications.
authorStéphane Jacob <sj@m4x.org>
Fri, 18 Feb 2011 14:20:29 +0000 (15:20 +0100)
committerStéphane Jacob <sj@m4x.org>
Fri, 18 Feb 2011 14:20:29 +0000 (15:20 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile/page.inc.php

index dd20de4..2bc4c52 100644 (file)
@@ -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),