From 2713ed39b873b356db0b9edd7128849eb65f1c92 Mon Sep 17 00:00:00 2001 From: Thibault Dockx <thibault.dockx@fusiondirectory.org> Date: Mon, 10 Mar 2025 14:57:13 +0000 Subject: [PATCH] :ambulance: (setup) - fixes setup p1 backup and some fixes in setup. --- html/setup.php | 6 +----- setup/class_setupStep.inc | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/html/setup.php b/html/setup.php index 11205caa7..f8afdd83f 100755 --- a/html/setup.php +++ b/html/setup.php @@ -59,11 +59,7 @@ ini_set("session.gc_maxlifetime", 24 * 60 * 60); session::start(); session::set('DEBUGLEVEL', 0); -try { - CSRFProtection::check(); -} catch (FusionDirectoryException $e) { - -} +CSRFProtection::check(); /* Attribute initialization, reset errors */ reset_errors(); diff --git a/setup/class_setupStep.inc b/setup/class_setupStep.inc index a357213aa..6c9222bbe 100755 --- a/setup/class_setupStep.inc +++ b/setup/class_setupStep.inc @@ -42,6 +42,30 @@ class setupStep extends simplePlugin $this->update_strings(); } + public function __serialize(): array + { + return [ + 's_short_name' => $this->s_short_name, + 's_title' => $this->s_title, + 's_description' => $this->s_description, + 'is_active' => $this->is_active, + 'is_enabled' => $this->is_enabled, + 'is_completed' => $this->is_completed, + 'header_image' => $this->header_image, + ]; + } + + public function __unserialize(array $data): void + { + $this->s_short_name = $data['s_short_name'] ?? 'Still undefined'; + $this->s_title = $data['s_title'] ?? 'Still undefined'; + $this->s_description = $data['s_description'] ?? 'Still undefined'; + $this->is_active = $data['is_active'] ?? FALSE; + $this->is_enabled = $data['is_enabled'] ?? FALSE; + $this->is_completed = $data['is_completed'] ?? FALSE; + $this->header_image = $data['header_image'] ?? ''; + } + function update_strings () { die('abstract method'); -- GitLab