diff options
Diffstat (limited to 'lib/tpl/index.php')
-rw-r--r-- | lib/tpl/index.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/tpl/index.php b/lib/tpl/index.php index 0273e5678..3c00ab8e8 100644 --- a/lib/tpl/index.php +++ b/lib/tpl/index.php @@ -12,9 +12,8 @@ if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); if(!defined('NOSESSION')) define('NOSESSION',1); require_once(DOKU_INC.'inc/init.php'); ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> +<!DOCTYPE html> +<html lang="en" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Template Replacements</title> @@ -44,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>"; @@ -54,14 +57,14 @@ if ($ini) { echo '<td>'.htmlspecialchars($val).'</td>'; echo '<td>'; if(preg_match('/^#[0-f]{3,6}$/i',$val)){ - echo '<div class="color" style="background-color:'.$val.';"> </div>'; + echo '<div class="color" style="background-color:'.$val.';"> </div>'; } echo '</td>'; echo '</tr>'; } 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> |