From 5d83ff5b34d7f6be53139e9582c2d4163eb47d42 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 18 Jan 2015 14:28:53 +0100 Subject: [PATCH] only updating the changed fields (performance) --- actions/apiqvitternotifications.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actions/apiqvitternotifications.php b/actions/apiqvitternotifications.php index e4236c2..aa242ce 100644 --- a/actions/apiqvitternotifications.php +++ b/actions/apiqvitternotifications.php @@ -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); } }