From f4865457f5b46e48af858eb5a591be43220b2cda Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Fri, 1 May 2026 11:42:29 +0100 Subject: Fix: updating certain tree settings applies the change to all trees --- app/Tree.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Tree.php b/app/Tree.php index f75e81f504..44e1a6fbb3 100644 --- a/app/Tree.php +++ b/app/Tree.php @@ -156,14 +156,18 @@ class Tree case 'CONTACT_USER_ID': case 'WEBMASTER_USER_ID': trigger_error('Deprecated since 2.2.6 - update the table directly'); - DB::table('gedcom')->update(['support_user_id' => $setting_value === '' ? null : (int) $setting_value]); + DB::table('gedcom') + ->where('gedcom_id', '=', $this->id) + ->update(['support_user_id' => $setting_value === '' ? null : (int) $setting_value]); return $this; case 'imported': case 'REQUIRE_AUTHENTICATION': trigger_error('Deprecated since 2.2.6 - update the table directly'); - DB::table('gedcom')->update(['private' => (int) $setting_value]); + DB::table('gedcom') + ->where('gedcom_id', '=', $this->id) + ->update(['private' => (int) $setting_value]); return $this; @@ -171,7 +175,9 @@ class Tree case 'MEDIA_DIRECTORY': case 'title': trigger_error('Deprecated since 2.2.6 - update the table directly'); - DB::table('gedcom')->update(['title' => $setting_value]); + DB::table('gedcom') + ->where('gedcom_id', '=', $this->id) + ->update(['title' => $setting_value]); return $this; } -- cgit v1.3