diff options
author | Valentin Popov <info@valentineus.link> | 2018-03-13 00:34:19 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-03-13 00:34:19 +0300 |
commit | 95c54f82627424667af7a4a8af014baeffafa073 (patch) | |
tree | a136c29b11c7b6bac0c74de4b49a304de176c97d /lib.php | |
parent | 6a83be960ec751eb42628e92e90b237efcb62a36 (diff) | |
download | local_webhooks-95c54f82627424667af7a4a8af014baeffafa073.tar.xz local_webhooks-95c54f82627424667af7a4a8af014baeffafa073.zip |
Update function 'local_webhooks_create_backup'
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'lib.php')
-rw-r--r-- | lib.php | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -231,13 +231,17 @@ function local_webhooks_delete_all_records() { * @return string */ function local_webhooks_create_backup() { - $listrecords = local_webhooks_get_list_records(); - $result = local_webhooks_serialization_data($listrecords); + $records = local_webhooks_get_list_records(); + $result = false; + + if ($serialize = serialize($records)) { + $result = gzcompress($serialize, 9); + } /* Event notification */ local_webhooks_events::backup_performed(); - return $result; + return base64_encode($result); } /** |