From b66c0afc8fab2e338402a9a4f8105e5f5459e208 Mon Sep 17 00:00:00 2001
From: Benjamin Bellamy <ben@podlibre.org>
Date: Thu, 11 Feb 2021 19:07:30 +0100
Subject: [PATCH] fix(admin): save block and lock switches

---
 app/Controllers/Admin/Podcast.php | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/Controllers/Admin/Podcast.php b/app/Controllers/Admin/Podcast.php
index 706a9e6c0e..342280c540 100644
--- a/app/Controllers/Admin/Podcast.php
+++ b/app/Controllers/Admin/Podcast.php
@@ -163,7 +163,7 @@ class Podcast extends BaseController
             'copyright' => $this->request->getPost('copyright'),
             'location' => $this->request->getPost('location_name'),
             'payment_pointer' => $this->request->getPost('payment_pointer'),
-            'is_blocked' => $this->request->getPost('is_blocked') === 'yes',
+            'is_blocked' => $this->request->getPost('block') === 'yes',
             'is_completed' => $this->request->getPost('complete') === 'yes',
             'is_locked' => $this->request->getPost('lock') === 'yes',
             'created_by' => user(),
@@ -259,11 +259,10 @@ class Podcast extends BaseController
         $this->podcast->payment_pointer = $this->request->getPost(
             'payment_pointer'
         );
-        $this->podcast->is_blocked =
-            $this->request->getPost('is_blocked') === 'yes';
+        $this->podcast->is_blocked = $this->request->getPost('block') === 'yes';
         $this->podcast->is_completed =
             $this->request->getPost('complete') === 'yes';
-        $this->podcast->is_lock = $this->request->getPost('lock') === 'yes';
+        $this->podcast->is_locked = $this->request->getPost('lock') === 'yes';
         $this->updated_by = user();
 
         $db = \Config\Database::connect();
-- 
GitLab