use core tpl_includeFile() if it exists

This commit is contained in:
Anika Henke 2012-08-26 18:06:52 +01:00
parent 0009a803ac
commit d386b375f2
4 changed files with 14 additions and 7 deletions

View file

@ -25,7 +25,7 @@ if (!defined('DOKU_INC')) die();
<?php tpl_metaheaders()?> <?php tpl_metaheaders()?>
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
<?php echo tpl_favicon(array('favicon', 'mobile')) ?> <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php _tpl_include('meta.html') ?> <?php tpl_includeFile('meta.html') ?>
</head> </head>
<body> <body>

View file

@ -22,7 +22,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
<?php tpl_metaheaders() ?> <?php tpl_metaheaders() ?>
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
<?php echo tpl_favicon(array('favicon', 'mobile')) ?> <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php _tpl_include('meta.html') ?> <?php tpl_includeFile('meta.html') ?>
</head> </head>
<body> <body>
@ -37,7 +37,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
<div id="dokuwiki__site"><div id="dokuwiki__top" <div id="dokuwiki__site"><div id="dokuwiki__top"
class="dokuwiki site mode_<?php echo $ACT ?>"> class="dokuwiki site mode_<?php echo $ACT ?>">
<?php html_msgarea() /* occasional error and info messages on top of the page */ ?> <?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
<?php _tpl_include('header.html') ?> <?php tpl_includeFile('header.html') ?>
<!-- ********** HEADER ********** --> <!-- ********** HEADER ********** -->
<div id="dokuwiki__header"><div class="pad"> <div id="dokuwiki__header"><div class="pad">
@ -120,7 +120,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
<!-- ********** CONTENT ********** --> <!-- ********** CONTENT ********** -->
<div id="dokuwiki__content"><div class="pad"> <div id="dokuwiki__content"><div class="pad">
<?php tpl_flush() /* flush the output buffer */ ?> <?php tpl_flush() /* flush the output buffer */ ?>
<?php _tpl_include('pageheader.html') ?> <?php tpl_includeFile('pageheader.html') ?>
<div class="page"> <div class="page">
<!-- wikipage start --> <!-- wikipage start -->
@ -130,7 +130,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
</div> </div>
<?php tpl_flush() ?> <?php tpl_flush() ?>
<?php _tpl_include('pagefooter.html') ?> <?php tpl_includeFile('pagefooter.html') ?>
</div></div><!-- /content --> </div></div><!-- /content -->
<div class="clearer"></div> <div class="clearer"></div>
@ -161,7 +161,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
<?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?> <?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
</div></div><!-- /footer --> </div></div><!-- /footer -->
<?php _tpl_include('footer.html') ?> <?php tpl_includeFile('footer.html') ?>
</div></div><!-- /site --> </div></div><!-- /site -->
<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div> <div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>

View file

@ -23,7 +23,7 @@ if (!defined('DOKU_INC')) die();
<?php tpl_metaheaders()?> <?php tpl_metaheaders()?>
<meta name="viewport" content="width=device-width,initial-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1" />
<?php echo tpl_favicon(array('favicon', 'mobile')) ?> <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php _tpl_include('meta.html') ?> <?php tpl_includeFile('meta.html') ?>
</head> </head>
<body> <body>

View file

@ -187,3 +187,10 @@ function _tpl_include($fn) {
else if (file_exists($tplFile)) else if (file_exists($tplFile))
include($tplFile); include($tplFile);
} }
/* use core function if available, otherwise the custom one */
if (!function_exists('tpl_includeFile')) {
function tpl_includeFile($fn){
_tpl_include($fn);
}
}