git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7feba4
)
page: only html body on application/xml requests
author
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 28 Dec 2020 02:33:21 +0000
(
03:33
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 1 Jan 2021 17:30:40 +0000
(18:30 +0100)
page.inc.php
patch
|
blob
|
history
page.php
patch
|
blob
|
history
diff --git
a/page.inc.php
b/page.inc.php
index 6ffd9cc6321cd0c05c07d8669137b61c9633068a..23a7106c1d470e1705d6d830a263b8802c84c5d0 100644
(file)
--- a/
page.inc.php
+++ b/
page.inc.php
@@
-23,8
+23,6
@@
$nav = preg_replace_callback('{<a href="([^"]+)">(.*?)</a>}', function ($m) {
print $nav;
print "</header>\n\n";
-print $Page->render();
-
register_shutdown_function(function () {
print '<footer>';
@include 'footer.inc.html';
diff --git
a/page.php
b/page.php
index 95fd01fdb716d99c98c3e71485df69926a3dbaf6..dae508103159e3518fab45a6334ba14255a95710 100644
(file)
--- a/
page.php
+++ b/
page.php
@@
-83,5
+83,8
@@
else {
}
}
-include_once 'page.inc.php';
+if (!$Page->api and $_SERVER['HTTP_ACCEPT'] !== 'application/xml') {
+ include_once 'page.inc.php';
+}
+print $Page->render();