diff options
author | zotlabs <mike@macgirvin.com> | 2016-12-30 02:45:16 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-12-30 02:45:16 -0800 |
commit | 2e2254371a0d6bdc2bb6e13b699e6353e42b1c2f (patch) | |
tree | 7b7f0e7bcf57b57aa6ce0d5a050e0b4353dacb5e /include | |
parent | 693f7366a2f8f4e7c4686e5701ff182da848dbb5 (diff) | |
download | volse-hubzilla-2e2254371a0d6bdc2bb6e13b699e6353e42b1c2f.tar.gz volse-hubzilla-2e2254371a0d6bdc2bb6e13b699e6353e42b1c2f.tar.bz2 volse-hubzilla-2e2254371a0d6bdc2bb6e13b699e6353e42b1c2f.zip |
move api version call back to core
Diffstat (limited to 'include')
-rw-r--r-- | include/api_zot.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/api_zot.php b/include/api_zot.php index 82de85454..0881211d0 100644 --- a/include/api_zot.php +++ b/include/api_zot.php @@ -1,6 +1,8 @@ <?php function zot_api_init() { + api_register_func('api/red/version','api_zot_version',false); + api_register_func('api/z/1.0/version','api_zot_version',false); api_register_func('api/export/basic','api_export_basic', true); api_register_func('api/red/channel/export/basic','api_export_basic', true); api_register_func('api/z/1.0/channel/export/basic','api_export_basic', true); @@ -42,6 +44,22 @@ } + function api_zot_version($type) { + + if($type === 'xml') { + header('Content-type: application/xml'); + echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n" . '<version>' . Zotlabs\Lib\System::get_project_version() . '</version>' . "\r\n"; + killme(); + } + elseif($type === 'json') { + header('Content-type: application/json'); + echo '"' . Zotlabs\Lib\System::get_project_version() . '"'; + killme(); + } + } + + + /* * Red basic channel export */ |