Update function 'local_webhooks_create_backup'

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
2018-03-13 01:34:19 +04:00
parent 6a83be960e
commit 95c54f8262

10
lib.php
View File

@@ -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);
}
/**