From 4f069ddeed6521508507179872b86f5b8b42f9c3 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 8 Sep 2005 02:05:31 +0200 Subject: pluginutils update avoid missing aggregate files before plugin manager has created them darcs-hash:20050908000531-50fdc-f4542a4c6b597ffeaa8c81afd35a41e667f5fa52.gz --- inc/pluginutils.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'inc/pluginutils.php') diff --git a/inc/pluginutils.php b/inc/pluginutils.php index 67ce191a3..d35b0dbc2 100644 --- a/inc/pluginutils.php +++ b/inc/pluginutils.php @@ -12,23 +12,25 @@ function plugin_printCSSJS(){ global $conf; - if (isset($conf['pluginmanager']) && $conf['pluginmanager']) { + if (isset($conf['pluginmanager']) && $conf['pluginmanager'] && + // implicit check that plugin manager has setup the aggregated files - it has styles of its own + @file_exists(DOKU_INC.'lib/plugins/plugin_style.css')) { // individual plugin instances of the files swept into one file each $dir = "lib/plugins/plugin_"; - if(@file_exists(DOKU_INC.$dir.'style.css')){ - print ' '."\n"; + if(@file_exists(DOKU_INC.$dir.'style.css')){ + print ' '."\n"; } - if(@file_exists(DOKU_INC.$dir.'screen.css')){ - print ' '."\n"; + if(@file_exists(DOKU_INC.$dir.'screen.css')){ + print ' '."\n"; } - if(@file_exists(DOKU_INC.$dir.'print.css')){ - print ' '."\n"; + if(@file_exists(DOKU_INC.$dir.'print.css')){ + print ' '."\n"; } - if(@file_exists(DOKU_INC.$dir.'script.js')){ - print ' '."\n"; + if(@file_exists(DOKU_INC.$dir.'script.js')){ + print ' '."\n"; } } else { - // no plugin manager so individual instances of these files for any plugin that uses them + // no plugin manager (or aggregate files not setup) so individual instances of these files for any plugin that uses them $plugins = plugin_list(); foreach ($plugins as $p){ $dir = "lib/plugins/$p/"; -- cgit v1.2.3