From 54d8d481c769a605cda1a1a6a483de9db6dd9d25 Mon Sep 17 00:00:00 2001 From: Forms Dev Date: Wed, 30 Aug 2023 16:00:57 +0530 Subject: [PATCH] fix test case --- app/Http/Middleware/Form/ProForm.php | 2 +- app/Service/Forms/FormCleaner.php | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/Http/Middleware/Form/ProForm.php b/app/Http/Middleware/Form/ProForm.php index 2f4732279..c92417346 100644 --- a/app/Http/Middleware/Form/ProForm.php +++ b/app/Http/Middleware/Form/ProForm.php @@ -18,7 +18,7 @@ class ProForm public function handle(Request $request, Closure $next) { if ($request->route('formId') && $form = Form::findOrFail($request->route('formId'))) { - if (true || $form->is_pro) { // For now it's FREE for all + if ($form->is_pro) { $request->merge([ 'form' => $form, ]); diff --git a/app/Service/Forms/FormCleaner.php b/app/Service/Forms/FormCleaner.php index 94613b2e5..fc2889e10 100644 --- a/app/Service/Forms/FormCleaner.php +++ b/app/Service/Forms/FormCleaner.php @@ -53,7 +53,7 @@ class FormCleaner 'discord_webhook_url' => "Discord webhook disabled.", 'editable_submissions' => 'Users will not be able to edit their submissions.', 'custom_code' => 'Custom code was disabled', - 'seo_meta' => 'Custom code was disabled', + 'seo_meta' => 'Custom SEO was disabled', // For fields 'file_upload' => "Link field is not a file upload.", @@ -266,20 +266,4 @@ private function cleanCustomKeys($key, $formVal) return $formVal; } - // Remove keys those have empty value - private function cleanCustomKeys($key, $formVal) - { - if (in_array($key, $this->customKeys) && $formVal !== null) { - $newVal = []; - foreach ($formVal as $k => $val) { - if ($val) { - $newVal[$k] = $val; - } - } - return $newVal; - } - - return $formVal; - } - }