From dc0a2a2a103aa295065f86b96aabc765ed3229d2 Mon Sep 17 00:00:00 2001 From: Maxco10 Date: Tue, 17 Oct 2023 21:59:56 +0200 Subject: [PATCH 1/3] Fixed bug on description field Signed-off-by: Maxco10 --- app/Repositories/Rule/RuleRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php index 09e02cbe75..3c19b3aac5 100644 --- a/app/Repositories/Rule/RuleRepository.php +++ b/app/Repositories/Rule/RuleRepository.php @@ -289,7 +289,7 @@ class RuleRepository implements RuleRepositoryInterface $rule->strict = array_key_exists('strict', $data) ? $data['strict'] : false; $rule->stop_processing = array_key_exists('stop_processing', $data) ? $data['stop_processing'] : false; $rule->title = $data['title']; - $rule->description = array_key_exists('stop_processing', $data) ? $data['stop_processing'] : null; + $rule->description = $data['description']; $rule->save(); $rule->refresh(); From 5f35bc5ee6b76f22bc27cd45564421c142735bfc Mon Sep 17 00:00:00 2001 From: Maxco10 Date: Wed, 25 Oct 2023 11:15:20 +0200 Subject: [PATCH 2/3] Added check on title and improved the check for description field Signed-off-by: Maxco10 --- app/Repositories/Rule/RuleRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php index 3c19b3aac5..9bd730682e 100644 --- a/app/Repositories/Rule/RuleRepository.php +++ b/app/Repositories/Rule/RuleRepository.php @@ -288,8 +288,8 @@ class RuleRepository implements RuleRepositoryInterface $rule->active = array_key_exists('active', $data) ? $data['active'] : true; $rule->strict = array_key_exists('strict', $data) ? $data['strict'] : false; $rule->stop_processing = array_key_exists('stop_processing', $data) ? $data['stop_processing'] : false; - $rule->title = $data['title']; - $rule->description = $data['description']; + $rule->title = array_key_exists('title', $data) ? $data['title'] : "untitle"; + $rule->description = array_key_exists('description', $data) ? $data['description'] : ""; $rule->save(); $rule->refresh(); From 4b7e1fcdb086b73332fd1ced9a03fe5786f0ed2f Mon Sep 17 00:00:00 2001 From: Maxco10 Date: Wed, 25 Oct 2023 11:58:14 +0200 Subject: [PATCH 3/3] Fixed spelling and replaced quotes Signed-off-by: Maxco10 --- app/Repositories/Rule/RuleRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php index 9bd730682e..be0e59f9b4 100644 --- a/app/Repositories/Rule/RuleRepository.php +++ b/app/Repositories/Rule/RuleRepository.php @@ -288,8 +288,8 @@ class RuleRepository implements RuleRepositoryInterface $rule->active = array_key_exists('active', $data) ? $data['active'] : true; $rule->strict = array_key_exists('strict', $data) ? $data['strict'] : false; $rule->stop_processing = array_key_exists('stop_processing', $data) ? $data['stop_processing'] : false; - $rule->title = array_key_exists('title', $data) ? $data['title'] : "untitle"; - $rule->description = array_key_exists('description', $data) ? $data['description'] : ""; + $rule->title = array_key_exists('title', $data) ? $data['title'] : 'Untitled'; + $rule->description = array_key_exists('description', $data) ? $data['description'] : ''; $rule->save(); $rule->refresh();