From 474109a5df0a06f5343ab184838fe2d80e3872a8 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 11 Jan 2026 19:23:20 +0000
Subject: [PATCH] =Fixed timeline CRUD.js issue where this.activeItem was set null when we still needed it

---
 inc/helpers/formatting.php |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/inc/helpers/formatting.php b/inc/helpers/formatting.php
index de3d379..ec0c40f 100644
--- a/inc/helpers/formatting.php
+++ b/inc/helpers/formatting.php
@@ -73,9 +73,9 @@
  */
 function jvbFormatRating(int $ID, JVBase\meta\MetaManager|null $meta = null):string
 {
-    $cache = CacheManager::for('bio-'.$ID, WEEK_IN_SECONDS);
-    $key = 'rating';
-    $cached = $cache->get($key);
+    $cache = CacheManager::for('rating', WEEK_IN_SECONDS)->connectTo('post')->connectTo('term');
+
+    $cached = $cache->get($ID);
     $cached = false;
     if ($cached) {
         return $cached;
@@ -100,7 +100,7 @@
         $out .= jvbFormatStarRating($avg, (int)$total);
     }
 
-    $cache->set($key, $out);
+    $cache->set($ID, $out);
     return $out;
 }
 
@@ -137,7 +137,7 @@
  */
 function jvbImageData(int $imgID):array
 {
-    $cache = CacheManager::for('imageData', WEEK_IN_SECONDS);
+    $cache = CacheManager::for('imageData', WEEK_IN_SECONDS)->connectTo('post');
     $cached = $cache->get($imgID);
     if ($cached) {
         return $cached;

--
Gitblit v1.10.0