X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/217f7dc706236f1edbff198893b54f3518742879..c173b349324dff9933e38a62ca14342430c75e51:/page.php diff --git a/page.php b/page.php index f9dabf0..8a37533 100644 --- a/page.php +++ b/page.php @@ -26,7 +26,7 @@ elseif (file_exists("$request/index.html")) { require_once('article.inc.php'); $Page = new ArchiveArticle($staticpage); -if ($_SERVER['HTTP_ACCEPT'] === 'text/plain') { +if (@$_SERVER['HTTP_ACCEPT'] === 'text/plain') { $Page->api = TRUE; } @@ -60,7 +60,8 @@ if ($Page->editable = $User->admin("edit {$Page->link}")) { include_once 'edit/head.inc.php'; } -if (isset($Page->raw)) { +if (isset($Page->raw) +and @$_SERVER['HTTP_ACCEPT'] !== 'application/xml') { $Page->raw = '
'."\n\n".$Page->raw."
\n\n"; } @@ -83,7 +84,7 @@ else { } } -if ($_SERVER['HTTP_ACCEPT'] === 'application/xml') { +if (@$_SERVER['HTTP_ACCEPT'] === 'application/xml') { header('Access-Control-Allow-Origin: *'); } elseif (!$Page->api) {