summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/format.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/format.php b/lib/format.php
index 8731eb0..6c18648 100644
--- a/lib/format.php
+++ b/lib/format.php
@@ -28,6 +28,26 @@ function export_as_requested($content) {
)
);
} else {
- throw_http_error(406,"Not Acceptable","Unknown output format.");
+ throw_http_error(
+ 406,
+ "Not Acceptable",
+ implode(
+ "<br>\n",
+ array_merge(
+ array(
+ "Unknown output format.",
+ "Accepted:"
+ ),
+ array_map(
+ function($type){
+ return "<a href=\"?" . $type . "\">" . $type . "</a>";
+ },
+ array_keys(
+ $content
+ )
+ )
+ )
+ )
+ );
}
}