From 7b72ad77dd90d254a569773b385627b05b6e9800 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 29 Dec 2005 12:57:14 +0000 Subject: [PATCH] disallow caching when stylechooser is active --- docs/NEWS | 4 ++++ .../serendipity_event_templatechooser.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 067808a..467a12e 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -75,6 +75,10 @@ Version 1.0 () Version 0.9.2 () ------------------------------------------------------------------------ + * Make templatechooser plugin emit a non-cached version of the + stylesheet, so that user-changes will be visible without manually + purging the cache (garvinhicking) + * Fix personal configuration no more able to lock you out of all user groups (garvinhicking) diff --git a/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php b/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php index 136b04f..c903c35 100644 --- a/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php +++ b/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php @@ -21,7 +21,7 @@ class serendipity_event_templatechooser extends serendipity_event $propbag->add('description', PLUGIN_EVENT_TEMPLATECHOOSER_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.2'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -57,6 +57,7 @@ class serendipity_event_templatechooser extends serendipity_event $templateInfo = serendipity_fetchTemplateInfo($_SESSION['serendipityUseTemplate']); $eventData['template'] = $_SESSION['serendipityUseTemplate']; $eventData['template_engine'] = isset($templateInfo['engine']) ? $templateInfo['engine'] : $serendipity['defaultTemplate']; + $serendipity['smarty_vars']['head_link_stylesheet'] = $serendipity['baseURL'] . 'serendipity.css.php?switch=' . $_REQUEST['user_template']; } return true; @@ -73,4 +74,3 @@ class serendipity_event_templatechooser extends serendipity_event } /* vim: set sts=4 ts=4 expandtab : */ -?> -- 2.39.5