From: Evan Prodromou Date: Thu, 6 Oct 2011 21:31:50 +0000 (-0400) Subject: start doing some writing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d92acda02a19da6501310a419d742e09d493e9bd;p=quix0rs-gnu-social.git start doing some writing --- diff --git a/plugins/OfflineBackup/offlinebackupqueuehandler.php b/plugins/OfflineBackup/offlinebackupqueuehandler.php index ae83e6741d..81b29c43bc 100644 --- a/plugins/OfflineBackup/offlinebackupqueuehandler.php +++ b/plugins/OfflineBackup/offlinebackupqueuehandler.php @@ -56,6 +56,31 @@ class OfflineBackupQueueHandler extends QueueHandler { $userId = $object; + $user = User::staticGet($userId); + + $fileName = $this->makeBackupFile($user); + + $this->notifyBackupFile($fileName); + return true; } + + function makeBackupFile($user) + { + $fileName = File::filename($user->getProfile(), "backup", "application/atom+xml"); + $fullPath = File::path($fileName); + + // XXX: this is pretty lose-y; try another way + + $actstr = new UserActivityStream($user, true, UserActivityStream::OUTPUT_RAW); + + file_put_contents($fullPath, $actstr->getString()); + + return $fileName; + } + + function notifyBackupFile($fileName) + { + $fileUrl = + } }