From 48721c85ebcfa973ee81719d2467ca80e4253dc9 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 01 May 2026 17:30:03 +0000
Subject: [PATCH] =Edmonton Ink hard test begins! Real testing of the managers and reset routes will commence. So far, just ensuring our classes are all loaded correctly: Site() and its sub-classes Membership, Login, etc. Care should be taken to load conditionally on 'init', as we finish defining most settings by 'plugins_loaded' at priority 5

---
 inc/managers/Notifications/Notifications.php |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/inc/managers/Notifications/Notifications.php b/inc/managers/Notifications/Notifications.php
index 8e83c41..4700c1d 100644
--- a/inc/managers/Notifications/Notifications.php
+++ b/inc/managers/Notifications/Notifications.php
@@ -130,11 +130,16 @@
 		$this->types = $types;
 	}
 
+	public function getNotificationTypes(bool $all = false):array
+	{
+		return ($all) ? $this->types : array_keys($this->types);
+	}
+
 	private function defineTable():void
 	{
 		$table = CustomTable::for('notifications_main');
 
-		$typeEnum = implode(',',array_map(function($type) { return '`'.$type.'`';}, array_keys($this->types)));
+		$typeEnum = implode(',',array_map(function($type) { return "'{$type}'";}, array_keys($this->types)));
 
 		$table->setColumns([
 			'id'			=> 'bigint(20) unsigned NOT NULL AUTO_INCREMENT',
@@ -159,7 +164,7 @@
 			'`user_status` (`for_user`, `status`)',
 			'`target_lookup` (`target_id`, `target_type`)',
 			'`unread_notifications` (`for_user`, `status`, `created_at`)',
-			'`requires_action` (`for_user`, `requires_action`, `action_taken`)',
+			'`requires_action` (`for_user`, `action_taken`)',
 			'`from_user_lookup` (`for_user`, `from_user`, `target_id`, `target_type`, `type`)'
 		]);
 

--
Gitblit v1.10.0