From f8ffc3dc1748b9af63123eb281696c0c30448715 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 30 Aug 2026 03:43:48 +0000
Subject: [PATCH] =Meta overhaul, attempting to simplify. Maybe it did?

---
 inc/meta/Group.php |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/inc/meta/Group.php b/inc/meta/Group.php
index ef21910..9d77b6d 100644
--- a/inc/meta/Group.php
+++ b/inc/meta/Group.php
@@ -16,7 +16,7 @@
 	{
 		$this->meta = $meta;
 		$this->name = $name;
-		$this->config = $meta->config($name) ?? [];
+		$this->config = $meta->getFieldConfig($name) ?? [];
 
 		$data = $meta->get($name);
 		$this->data = is_array($data) ? $data : [];
@@ -44,12 +44,11 @@
 		return $this->getPath($nested, $fieldConfig['fields'] ?? [], $parts);
 	}
 
-	public function set(string $path, mixed $value, bool $autosave = true): self
+	public function set(string $path, mixed $value, bool $autosave = true): bool
 	{
-		$parts = explode('|', $path);
+		$parts = explode('|', $path, 2);
 		$this->setPath($this->data, $this->config['fields'] ?? [], $parts, $value);
-		$this->sync($autosave);
-		return $this;
+		return $this->sync($autosave);
 	}
 
 	protected function setPath(array &$data, array $fieldsConfig, array $parts, mixed $value): void
@@ -83,7 +82,7 @@
 			}
 			$this->data[$field] = $value;
 		}
-		$this->sync(true);
+		$this->sync();
 		return $this;
 	}
 
@@ -97,8 +96,8 @@
 		return isset($this->config['fields'][$field]);
 	}
 
-	protected function sync(bool $autosave = true): void
+	protected function sync(bool $autosave = true): bool
 	{
-		$this->meta->set($this->name, $this->data, $autosave);
+		return $this->meta->set($this->name, $this->data);
 	}
 }

--
Gitblit v1.10.0