diff options
author | Anika Henke <anika@selfthinker.org> | 2015-07-25 23:13:18 +0100 |
---|---|---|
committer | Anika Henke <anika@selfthinker.org> | 2015-07-25 23:13:18 +0100 |
commit | 0bfc8d5a03c495c3436780901fe59341faee4d9e (patch) | |
tree | 5fe7a6e2e087880647a748b1fbd53ca66aafd943 /lib/exe/css.php | |
parent | cf2c8e759bf06596f9492d090f4dd8dbb76a178c (diff) | |
parent | 6cb9974651aef2a41b48fcb922cc6baa18a0660f (diff) | |
download | rpg-0bfc8d5a03c495c3436780901fe59341faee4d9e.tar.gz rpg-0bfc8d5a03c495c3436780901fe59341faee4d9e.tar.bz2 |
Merge remote-tracking branch 'origin/master' into styler
Conflicts:
lib/exe/css.php
Diffstat (limited to 'lib/exe/css.php')
-rw-r--r-- | lib/exe/css.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index dc4d7d75c..3b8a524bc 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -32,25 +32,24 @@ function css_out(){ global $config_cascade; global $INPUT; - // decide from where to get the template - $tpl = trim(preg_replace('/[^\w-]+/','',$INPUT->str('t'))); - if(!$tpl) $tpl = $conf['template']; - - // load style.ini - $styleini = css_styleini($tpl, $INPUT->bool('preview')); - - // find mediatypes if ($INPUT->str('s') == 'feed') { $mediatypes = array('feed'); $type = 'feed'; } else { - $mediatypes = array_unique(array_merge(array('screen', 'all', 'print'), array_keys($styleini['stylesheets']))); + $mediatypes = array('screen', 'all', 'print'); $type = ''; } + // decide from where to get the template + $tpl = trim(preg_replace('/[^\w-]+/','',$INPUT->str('t'))); + if(!$tpl) $tpl = $conf['template']; + // The generated script depends on some dynamic options $cache = new cache('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].$INPUT->int('preview').DOKU_BASE.$tpl.$type,'.css'); + // load styl.ini + $styleini = css_styleini($tpl, $INPUT->bool('preview')); + // if old 'default' userstyle setting exists, make it 'screen' userstyle for backwards compatibility if (isset($config_cascade['userstyle']['default'])) { $config_cascade['userstyle']['screen'] = array($config_cascade['userstyle']['default']); |