summaryrefslogtreecommitdiff
path: root/lib/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tpl')
-rw-r--r--lib/tpl/default/style.ini5
-rw-r--r--lib/tpl/dokuwiki/style.ini5
-rw-r--r--lib/tpl/index.php8
3 files changed, 16 insertions, 2 deletions
diff --git a/lib/tpl/default/style.ini b/lib/tpl/default/style.ini
index 7d27381c9..726c2025d 100644
--- a/lib/tpl/default/style.ini
+++ b/lib/tpl/default/style.ini
@@ -1,6 +1,11 @@
; Please see http://www.php.net/manual/en/function.parse-ini-file.php
; for limitations of the ini format used here
+; To extend this file or make changes to it, it is recommended to create
+; a style.local.ini file to prevent losing any changes after an upgrade.
+; Please don't forgot to copy the section your changes should be under
+; (i.e. [stylesheets] or [replacements]) into that file as well.
+
; Define the stylesheets your template uses here. The second value
; defines for which output media the style should be loaded. Currently
; print, screen and rtl are supported. rtl styles are loaded additionally
diff --git a/lib/tpl/dokuwiki/style.ini b/lib/tpl/dokuwiki/style.ini
index d0292e9b1..1402f751a 100644
--- a/lib/tpl/dokuwiki/style.ini
+++ b/lib/tpl/dokuwiki/style.ini
@@ -1,6 +1,11 @@
; Please see http://www.php.net/manual/en/function.parse-ini-file.php
; for limitations of the ini format used here
+; To extend this file or make changes to it, it is recommended to create
+; a style.local.ini file to prevent losing any changes after an upgrade.
+; Please don't forgot to copy the section your changes should be under
+; (i.e. [stylesheets] or [replacements]) into that file as well.
+
; Define the stylesheets your template uses here. The second value
; defines for which output media the style should be loaded. Currently
; print, screen and all are supported.
diff --git a/lib/tpl/index.php b/lib/tpl/index.php
index 357cc1f0d..3c00ab8e8 100644
--- a/lib/tpl/index.php
+++ b/lib/tpl/index.php
@@ -43,7 +43,11 @@ require_once(DOKU_INC.'inc/init.php');
</head>
<body>
<?php
-$ini = @parse_ini_file($conf['template'].'/style.ini',true);
+// get merged style.ini
+define('SIMPLE_TEST', true); // hack to prevent css output and headers
+require_once(DOKU_INC.'lib/exe/css.php');
+$ini = css_styleini(tpl_incdir());
+
if ($ini) {
echo '<table>';
echo "<caption>".htmlspecialchars($conf['template'])."'s style.ini</caption>";
@@ -60,7 +64,7 @@ if ($ini) {
}
echo '</table>';
} else {
- echo "<p>Non-existent template: <strong>".htmlspecialchars($conf['template'])."</strong></p>";
+ echo "<p>Non-existent or invalid template or style.ini: <strong>".htmlspecialchars($conf['template'])."</strong></p>";
}
?>
</body>