From dbf794bf86316c93b56454ab5d2c658598cce617 Mon Sep 17 00:00:00 2001 From: Michael Hamann <michael@content-space.de> Date: Tue, 18 Sep 2012 22:46:47 +0200 Subject: [PATCH] Set default userstyle only once as screen userstyle --- lib/exe/css.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/exe/css.php b/lib/exe/css.php index 0ad9dee06..cee806ef4 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -61,6 +61,11 @@ function css_out(){ } } + // if old 'default' userstyle setting exists, make it 'screen' userstyle for backwards compatibility + if (isset($config_cascade['userstyle']['default'])) { + $config_cascade['userstyle']['screen'] = $config_cascade['userstyle']['default']; + } + // start output buffering ob_start(); @@ -86,10 +91,6 @@ function css_out(){ if (isset($tplstyles[$mediatype])) { $files[$mediatype] = array_merge($files[$mediatype], $tplstyles[$mediatype]); } - // if old 'default' userstyle setting exists, make it 'screen' userstyle for backwards compatibility - if (isset($config_cascade['userstyle']['default'])) { - $config_cascade['userstyle']['screen'] = $config_cascade['userstyle']['default']; - } // load user styles if(isset($config_cascade['userstyle'][$mediatype])){ $files[$mediatype][$config_cascade['userstyle'][$mediatype]] = DOKU_BASE; -- GitLab