From 6b0172d093626a8c2c90f8ceeb42590300b32530 Mon Sep 17 00:00:00 2001
From: Michael <heluecht@pirati.ca>
Date: Tue, 19 Oct 2021 19:53:10 +0000
Subject: [PATCH] Replace calls to "notification" with the new function

---
 public_server/public_server.php | 2 +-
 testdrive/testdrive.php         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/public_server/public_server.php b/public_server/public_server.php
index 041199dd..0ae3c15c 100644
--- a/public_server/public_server.php
+++ b/public_server/public_server.php
@@ -54,7 +54,7 @@ function public_server_cron($a, $b)
 	$users = DBA::selectToArray('user', [], ["`account_expires_on` < UTC_TIMESTAMP() + INTERVAL ? DAY AND
 		`account_expires_on` > ? AND `expire_notification_sent` <= ?", 5, DBA::NULL_DATETIME, DBA::NULL_DATETIME]);
 	foreach ($users as $rr) {
-		notification([
+		DI::notify()->createFromArray([
 			'type' => Notification\Type::SYSTEM,
 			'uid' => $rr['uid'],
 			'system_type' => 'public_server_expire',
diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php
index a663c3f1..df7d3c5f 100644
--- a/testdrive/testdrive.php
+++ b/testdrive/testdrive.php
@@ -51,7 +51,7 @@ function testdrive_cron($a,$b) {
 	$users = DBA::selectToArray('user', [], ["`account_expires_on` < UTC_TIMESTAMP() + INTERVAL ? DAY AND `expire_notification_sent` <= ?",
 		5, DBA::NULL_DATETIME]);
 	foreach($users as $rr) {
-		notification([
+		DI::notify()->createFromArray([
 			'type' => Notification\Type::SYSTEM,
 			'uid' => $rr['uid'],
 			'system_type' => 'testdrive_expire',