aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib.php b/lib.php
index ba27486..f229612 100644
--- a/lib.php
+++ b/lib.php
@@ -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);
}
/**