X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/c7feba44bdf1102b80a09f683321559d18755a24..b88d21d03da5f43a5c6177a3e12d10ef2b326be2:/page.php diff --git a/page.php b/page.php index 95fd01f..0c101f8 100644 --- a/page.php +++ b/page.php @@ -69,7 +69,7 @@ if (isset($Page->raw)) { include_once 'format.inc.php'; ob_start(); -if ($Page->handler and !require("./{$Page->handler}/index.php")) { +if ($Page->handler and !$Page->index($Page->api)) { # replace contents by code output on false return $Page->raw = ob_get_clean(); } @@ -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();