We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 737e2354 authored by Evan Prodromou's avatar Evan Prodromou

send backup files

parent d92acda0
...@@ -60,7 +60,7 @@ class OfflineBackupQueueHandler extends QueueHandler ...@@ -60,7 +60,7 @@ class OfflineBackupQueueHandler extends QueueHandler
$fileName = $this->makeBackupFile($user); $fileName = $this->makeBackupFile($user);
$this->notifyBackupFile($fileName); $this->notifyBackupFile($user, $fileName);
return true; return true;
} }
...@@ -79,8 +79,19 @@ class OfflineBackupQueueHandler extends QueueHandler ...@@ -79,8 +79,19 @@ class OfflineBackupQueueHandler extends QueueHandler
return $fileName; return $fileName;
} }
function notifyBackupFile($fileName) function notifyBackupFile($user, $fileName)
{ {
$fileUrl = $fileUrl = File::url($fileName);
$body = sprintf(_m("The backup file you requested is ready for download.\n\n".
"%s\n".
"Thanks for your time,\n",
"%s\n"),
$fileUrl,
common_config('site', 'name'));
$headers = _mail_prepare_headers('offlinebackup', $user->nickname, $user->nickname);
mail_to_user($user, _('Backup file ready for download'), $body, $headers);
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment