summaryrefslogtreecommitdiff
path: root/lib/tpl/index.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2012-10-07 15:30:38 +0100
committerAnika Henke <anika@selfthinker.org>2012-10-07 15:30:38 +0100
commit0e6f9f08b1c948f45d1867346a4502021afa55bc (patch)
tree0c80d4ee3f48fabab4ecedd2d448baea5d97e2e7 /lib/tpl/index.php
parent3046a46462b44f28b1e5b1b25240a8ac4a859020 (diff)
downloadrpg-0e6f9f08b1c948f45d1867346a4502021afa55bc.tar.gz
rpg-0e6f9f08b1c948f45d1867346a4502021afa55bc.tar.bz2
added support for local style.ini files
Diffstat (limited to 'lib/tpl/index.php')
-rw-r--r--lib/tpl/index.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/tpl/index.php b/lib/tpl/index.php
index 357cc1f0d..7cdec9774 100644
--- a/lib/tpl/index.php
+++ b/lib/tpl/index.php
@@ -43,7 +43,13 @@ require_once(DOKU_INC.'inc/init.php');
</head>
<body>
<?php
-$ini = @parse_ini_file($conf['template'].'/style.ini',true);
+$styleini = '';
+if(@file_exists($conf['template'].'/style.local.ini'))
+ $styleini = $conf['template'].'/style.local.ini';
+else if(@file_exists($conf['template'].'/style.ini'))
+ $styleini = $conf['template'].'/style.ini';
+$ini = @parse_ini_file($styleini, true);
+
if ($ini) {
echo '<table>';
echo "<caption>".htmlspecialchars($conf['template'])."'s style.ini</caption>";
@@ -60,7 +66,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>