From fff721dd185f5b97f7ae7a6e64189e55887ff590 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 05 Jul 2026 18:36:57 +0000
Subject: [PATCH] =Cleaning up the Square integration (still a bit more to do yet). Also majorly overhauled /rest/ files to ignore a rest request 'user' paramater, and rely on get_current_user_id() instead.

---
 checks.php |   33 ++++++++++++++++-----------------
 1 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/checks.php b/checks.php
index 6b55711..25e4f80 100644
--- a/checks.php
+++ b/checks.php
@@ -1,5 +1,6 @@
 <?php
 
+use JVBase\base\Options;
 use JVBase\base\Site;
 use JVBase\managers\Cache;
 use JVBase\registrar\Registrar;
@@ -14,26 +15,24 @@
 
 function jvbUserTypes():array
 {
-	return  Registrar::getFeatured('profile_link', 'user');
+	return  Registrar::withFeature('profile_link', 'user');
 }
 
 
-//function jvbIsOpen():bool
-//{
-//
-//	if (!jvbCheck('limit_hours', JVB_SITE)) {
-//		return true;
-//	}
-//	if (get_option(BASE.'open_to_public') !== '1') {
-//		return false;
-//	}
-//	//Check if today_hours is set
-//	if (get_option(BASE.'today_hours')) {
-//		return jvbIsTimeBetween();
-//	}
-//	//Default to the stored settings
-//	return jvbIsCurrentlyOpen();
-//}
+
+function jvbIsOpen():bool
+{
+	if (!Site::has('limit_hours')) {
+		return true;
+	}
+	if (Options::get('open_to_public') !== '1') {
+		return false;
+	}
+	if (!empty(Options::get('today_hours'))) {
+		return jvbIsTimeBetween();
+	}
+	return jvbIsCurrentlyOpen();
+}
 
 
 function jvbTermHasPosts(int $termID, string $taxonomy):bool

--
Gitblit v1.10.0