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/blocks/TimelineBlock.php |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/inc/blocks/TimelineBlock.php b/inc/blocks/TimelineBlock.php
index 90cf469..5c21fdd 100644
--- a/inc/blocks/TimelineBlock.php
+++ b/inc/blocks/TimelineBlock.php
@@ -1,12 +1,10 @@
 <?php
 namespace JVBase\blocks;
 
-use JVBase\managers\CacheManager;
-use JVBase\forms\TaxonomySelector;
+use JVBase\managers\Cache;
 use JVBase\meta\MetaManager;
 use JVBase\utility\Features;
 use WP_Block;
-use WP_Query;
 
 if (!defined('ABSPATH')) {
     exit; // Exit if accessed directly
@@ -14,7 +12,7 @@
 
 class TimelineBlock
 {
-    protected CacheManager $cache;
+    protected Cache $cache;
     protected string $config;
     protected string $type;
     protected string $path = JVB_DIR . '/build/timeline';
@@ -31,9 +29,9 @@
 
     public function __construct()
     {
-        $this->cache = CacheManager::for('timelines', WEEK_IN_SECONDS)->connectTo('post', 'timeline');
+        $this->cache = Cache::for('timelines', WEEK_IN_SECONDS)->connect('post');
 		if (JVB_TESTING){
-			$this->cache->clear();
+			$this->cache->flush();
 		}
         add_action('init', [ $this, 'registerBlock' ]);
 		add_action('wp_footer', 'jvbRenderGallery');
@@ -122,7 +120,7 @@
 							?>
 
 							<?= $open ?>
-							<a href="<?=$link?>" rel="tag"><?=$term->name?></a>
+							<a href="<?=$link?>" rel="tag"><?=html_entity_decode($term->name)?></a>
 							<?= $close ?>
 						<?php }
 						if ($many) { echo '</ul>'; }
@@ -140,8 +138,10 @@
 				<?= jvbFormatImage(get_post_thumbnail_id($this->parentID), 'tiny', 'large', false) ?>
 			</div>
 			<div class="after">
+				<?php if (!empty($this->children)) :?>
 				<h3>After <?=$this->total?> Treatment<?= $this->total > 1 ? 's' : '' ?></h3>
 				<?= jvbFormatImage(get_post_thumbnail_id($this->children[count($this->children)-1]), 'tiny', 'large', false) ?>
+				<?php endif; ?>
 			</div>
 		</section>
 		<section id="info">
@@ -221,7 +221,7 @@
 		$out = '<ul class="term-list">';
 		foreach ($timeline as $term) {
 			$link = get_term_link($term->term_id, BASE.'timeline');
-			$out .= '<li><a href="'.$link.'" rel="tag" title="See more progressions at this timeline">'.jvbIcon(JVB_TAXONOMY['timeline']['icon']??'hourglass').$term->name.'</a><small>from the last treatment</small></li>';
+			$out .= '<li><a href="'.$link.'" rel="tag" title="See more progressions at this timeline">'.jvbIcon(JVB_TAXONOMY['timeline']['icon']??'hourglass').html_entity_decode($term->name).'</a><small>after the treatment</small></li>';
 		}
 		$out .='</ul>';
 		return $out;

--
Gitblit v1.10.0