mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
api-status: add sitemap_url property if the page-sitemap module is present
This commit is contained in:
parent
59b40026fc
commit
d7128eed0e
1 changed files with 3 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
register_module([
|
||||
"name" => "API status",
|
||||
"version" => "0.1",
|
||||
"version" => "0.2",
|
||||
"author" => "Starbeamrainbowlabs",
|
||||
"description" => "Provides a basic JSON status action that provides a few useful bits of information for API consumption.",
|
||||
"id" => "api-status",
|
||||
|
@ -41,6 +41,8 @@ register_module([
|
|||
$result->available_actions = $action_names;
|
||||
$result->wiki_name = $settings->sitename;
|
||||
$result->logo_url = $settings->favicon;
|
||||
if(module_exists("page-sitemap"))
|
||||
$result->sitemap_url = url_stem()."?action=sitemap";
|
||||
|
||||
header("content-type: application/json");
|
||||
exit($minified ? json_encode($result) : json_encode($result, JSON_PRETTY_PRINT) . "\n");
|
||||
|
|
Loading…
Reference in a new issue