page: prefer page template from script root
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 15 Sep 2017 17:32:23 +0000 (19:32 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 18 Sep 2017 18:21:28 +0000 (20:21 +0200)
Allow different defaults for prepending scripts.

page.php

index c34b11c765c51425bb7f634b9921d7e003279c1a..d0a8826a1106bff518009ed2da7c3303e00a786b 100644 (file)
--- a/page.php
+++ b/page.php
@@ -53,7 +53,7 @@ elseif (file_exists("$Page$Args.html")) {
        $found = include "./$Page$Args.html";
 }
 elseif (isset($User) and $User['admin']) {
-       $found = require './template.html';
+       $found = require (file_exists("$Page/template.html") ? "$Page/template.html" : './template.html');
 }
 
 print "</div>\n\n";