From 235ce5716edc2f7cbe80fdccf26eac7269587839 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 08 Jun 2026 04:38:18 +0000
Subject: [PATCH] =FavouritesManager.php and FavouritesRoutes.php fixes. Moving all logic to FavouritesManager.php. Still some left to do

---
 JVBase.php |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/JVBase.php b/JVBase.php
index 4c0bac8..bf0db8a 100644
--- a/JVBase.php
+++ b/JVBase.php
@@ -151,7 +151,7 @@
 			$this->managers['notifications'] = new NotificationManager();
 			$this->routes['notifications'] = new NotificationsRoutes();
 		}
-		if (!empty(Registrar::getFeatured('approve_new'))) {
+		if (!empty(Registrar::withFeature('approve_new'))) {
 			$this->managers['approvals'] = new ApprovalManager();
 		}
 		if (Site::has('feed_block') || Site::has('dashboard')) {
@@ -183,13 +183,13 @@
 		if ($membership && $membership->has('invitable')) {
 			$this->managers['invitations'] = new InvitationsManager();
 		}
-		if (!empty(Registrar::getFeatured('has_responses'))) {
+		if (!empty(Registrar::withFeature('has_responses'))) {
 			$this->routes['comments'] = new ResponseRoutes();
 		}
-		if (!empty(Registrar::getFeatured('karma'))) {
+		if (!empty(Registrar::withFeature('karma'))) {
 			$this->routes['vote'] = new VoteRoutes();
 		}
-		if (!empty(Registrar::getFeatured('karma'))
+		if (!empty(Registrar::withFeature('karma'))
 			|| ($membership && $membership->has('member_verified')) ||
             ($membership && $membership->has('term_approval'))) {
 			$this->routes['approvals'] = new ApprovalRoutes();
@@ -219,6 +219,11 @@
 		return array_merge(array_keys($this->content), array_keys($this->taxonomies));
 	}
 
+	public function favourites(): FavouritesManager|false
+	{
+		return $this->managers['favourites'] ?? false;
+	}
+
 	public function dashboard(): DashboardManager|false
 	{
 		return $this->managers['dash'] ?? false;
@@ -365,7 +370,7 @@
 
 		if (!empty ($buttons)) {
 			?>
-			<section class="additional-actions">
+			<section class="main-actions">
 				<div class="buttons col">
 					<?= implode($buttons); ?>
 				</div>

--
Gitblit v1.10.0