Skip to content
Snippets Groups Projects
Commit 2b1223ec authored by Adrian Lang's avatar Adrian Lang
Browse files

Move page template parsing to an own function

parent c1b2e736
No related branches found
No related tags found
No related merge requests found
......@@ -808,7 +808,6 @@ function rawWiki($id,$rev=''){
function pageTemplate($data){
$id = $data[0];
global $conf;
global $INFO;
$path = dirname(wikiFN($id));
......@@ -825,7 +824,16 @@ function pageTemplate($data){
$path = substr($path, 0, strrpos($path, '/'));
}
}
if(!$tpl) return '';
return isset($tpl) ? parsePageTemplate($tpl, $id) : '';
}
/**
* Performs common page template replacements
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function parsePageTemplate($tpl, $id) {
global $INFO;
// replace placeholders
$file = noNS($id);
......@@ -868,7 +876,6 @@ function pageTemplate($data){
return $tpl;
}
/**
* Returns the raw Wiki Text in three slices.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment