From b38f03c0e7218762d90fa5092696b127f24f36db Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 25 Jan 2026 07:07:26 +0000
Subject: [PATCH] =Some logical flaws in Queue.php, Queue.js, ContentExecutor.php, UploadExecutor.php - particularly with timeline ordering, frontend queue updates, etc

---
 inc/rest/routes/ApprovalRoutes.php |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/inc/rest/routes/ApprovalRoutes.php b/inc/rest/routes/ApprovalRoutes.php
index 3052999..62fc5e4 100644
--- a/inc/rest/routes/ApprovalRoutes.php
+++ b/inc/rest/routes/ApprovalRoutes.php
@@ -4,7 +4,8 @@
 
 use JVBase\JVB;
 use JVBase\rest\RestRouteManager;
-use JVBase\managers\CacheManager;
+use JVBase\managers\Cache;
+use JVBase\utility\Features;
 use WP_User;
 use WP_REST_Request;
 use WP_REST_Response;
@@ -23,15 +24,17 @@
 	protected array $voteTables;
 
     protected int $expiryDays = 7;
+	protected bool $hasMemberApproval = false;
 
     public function __construct()
     {
         $this->cache_name = 'approvals';
+		$this->hasMemberApproval = Features::forMembership()->has('member_verified');
         parent::__construct();
 
         $this->initTypes();
 
-        if (jvbSiteHasMemberApproval()) {
+        if ($this->hasMemberApproval) {
             add_action('user_register', [$this, 'handleNewUserRegistration'], 10, 2);
         }
 
@@ -43,7 +46,7 @@
         $approvals = jvbApprovalTypes();
         $this->userTypes = [];
         $this->termTypes = [];
-        if (jvbSiteHasMemberApproval()) {
+        if ($this->hasMemberApproval) {
             $this->userTypes = array_filter(
                 array_keys($approvals),
                 function ($item) {
@@ -943,7 +946,7 @@
         }
 
         // Clear caches
-        CacheManager::invalidateGroup('approvals');
+		$this->cache->flush();
     }
 
     public function getApprovals(WP_REST_Request $request)

--
Gitblit v1.10.0