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

---
 inc/registrar/Registrar.php |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/inc/registrar/Registrar.php b/inc/registrar/Registrar.php
index 6b5cf2c..8b4b57f 100644
--- a/inc/registrar/Registrar.php
+++ b/inc/registrar/Registrar.php
@@ -724,9 +724,10 @@
 	public function getSections():array
 	{
 		$allSections = array_map(function($section) {
-			return $section->getConfig;
+			return $section->getConfig();
 		}, $this->sections);
 
+
 		if (!empty($this->sectionOrder)) {
 			$allSections['order'] = $this->sectionOrder;
 		}
@@ -759,13 +760,11 @@
 			foreach ($sections as $s) {
 				$section = new Section($s, $this);
 				$section->setTitle(ucwords(implode(' ', explode('-', $s))));
-				$sectionFields = array_map(function ($f) {
-					return $f['name'];
-				}, array_filter($fields, function ($f) use ($s) {
+				$sectionFields = array_filter($fields, function ($f) use ($s) {
 					$tmp = array_key_exists('section', $f) && !is_null($f['section']) ? $f['section'] : 'main';
 					return $s === $tmp;
-				}));
-				$section->setFields($sectionFields);
+				});
+				$section->setFields(array_keys($sectionFields));
 				$this->sections[$s] = $section;
 			}
 		}

--
Gitblit v1.10.0