From: Mikael Nordfeldth Date: Fri, 13 Feb 2015 10:54:15 +0000 (+0100) Subject: DirectMessages backed up properly for UAS X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e9457db8b2f6999ecf01d792ea13adeef8126844;p=quix0rs-gnu-social.git DirectMessages backed up properly for UAS --- diff --git a/plugins/DirectMessage/DirectMessagePlugin.php b/plugins/DirectMessage/DirectMessagePlugin.php index 6be9fb5083..de13ef680f 100644 --- a/plugins/DirectMessage/DirectMessagePlugin.php +++ b/plugins/DirectMessage/DirectMessagePlugin.php @@ -63,7 +63,9 @@ class DirectMessagePlugin extends Plugin if (!empty($uas->after)) { $messages = array_filter($messages, array($uas, 'createdAfter')); } - $objs[] = $messages; + foreach ($messages as $message) { + $objs[] = clone($message); + } // Messages _to_ the user $msgMap = Message::listGet('to_profile', array($uas->getUser()->id)); @@ -71,7 +73,9 @@ class DirectMessagePlugin extends Plugin if (!empty($uas->after)) { $messages = array_filter($messages, array($uas, 'createdAfter')); } - $objs[] = $messages; + foreach ($messages as $message) { + $objs[] = clone($message); + } return true; }