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/ui/CRUDSkeleton.php |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/inc/ui/CRUDSkeleton.php b/inc/ui/CRUDSkeleton.php
index d1d4834..2e35ae0 100644
--- a/inc/ui/CRUDSkeleton.php
+++ b/inc/ui/CRUDSkeleton.php
@@ -1579,7 +1579,7 @@
 			<input type="hidden" name="content" value="<?=$this->dataType?>" />
 			<div class="fields">
 				<?php
-				if (!empty($this->statuses)) {
+				if (empty($this->sections) && !empty($this->statuses)) {
 					echo Form::render('post_status', '', $this->getStatusFieldConfig('edit-'));
 				}
 
@@ -1593,8 +1593,9 @@
 								'icon'	=> $config['icon']
 							];
 						}
+
 						$tabs[$slug] = array_merge([
-							'title'	=> $config['label'],
+							'title'	=> $config['title'],
 							'content' => '',
 							'description' => $config['description']??'',
 						], $section);
@@ -1615,7 +1616,7 @@
 					foreach ($first as $f) {
 						if (array_key_exists($f, $fields)) {
 							if ($tabs) {
-								$tabs['basic']['content'] .= Form::render($f, '', $fields[$f]);
+								$tabs['main']['content'] .= Form::render($f, '', $fields[$f]);
 							} else {
 								echo Form::render($f, '', $fields[$f]);
 							}
@@ -1660,12 +1661,13 @@
 
 					$fields = $this->nonTimelineFields;
 				}
+
 				foreach ($fields as $n => $config) {
 					if (in_array($config['type'], ['taxonomy', 'selector'])) {
 						$config = array_merge($config, $this->taxConfig($config['taxonomy'], $config['label']));
 					}
 					if ($tabs) {
-						$section = (array_key_exists('section', $config)) ? $config['section'] : 'basic';
+						$section = (array_key_exists('section', $config)) && !empty($config['section']) ? $config['section'] : 'main';
 						$tabs[$section]['content'] .= Form::render($n, '', $config);
 					} else {
 						echo Form::render($n, '', $config);

--
Gitblit v1.10.0