only updating the changed fields (performance)

This commit is contained in:
Mikael Nordfeldth 2015-01-18 14:28:53 +01:00
parent 03cba8fc0c
commit 5d83ff5b34

View File

@ -113,8 +113,9 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction
// mark as seen
if($notification->is_seen == 0) {
$orig = clone($notification);
$notification->is_seen = 1;
$notification->update();
$notification->update($orig);
}
}