diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-12-30 13:35:59 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-12-30 13:35:59 +0100 |
commit | 74d69bdedc6ba3edcb2de43bda1be453123292c1 (patch) | |
tree | 696390d951bb69c23a836fb29754dac4c25ed73d | |
parent | 8a074dedb6ded00589ea9890fd6b40789cf920ce (diff) | |
parent | 2e2254371a0d6bdc2bb6e13b699e6353e42b1c2f (diff) | |
download | volse-hubzilla-74d69bdedc6ba3edcb2de43bda1be453123292c1.tar.gz volse-hubzilla-74d69bdedc6ba3edcb2de43bda1be453123292c1.tar.bz2 volse-hubzilla-74d69bdedc6ba3edcb2de43bda1be453123292c1.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
-rw-r--r-- | include/api_zot.php | 18 | ||||
-rw-r--r-- | include/import.php | 4 |
2 files changed, 20 insertions, 2 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 */ diff --git a/include/import.php b/include/import.php index 0d8398acb..e3d3e7e81 100644 --- a/include/import.php +++ b/include/import.php @@ -86,7 +86,7 @@ function import_channel($channel, $account_id, $seize) { } if(! $r) { - logger('mod_import: channel clone failed. ', print_r($channel,true)); + logger('mod_import: channel clone failed. ' . print_r($channel,true)); notice( t('Channel clone failed. Import failed.') . EOL); return false; } @@ -96,7 +96,7 @@ function import_channel($channel, $account_id, $seize) { $channel['channel_guid'] // Already dbesc'd ); if(! $r) { - logger('mod_import: channel not found. ', print_r($channel,true)); + logger('mod_import: channel not found. ' . print_r($channel,true)); notice( t('Cloned channel not found. Import failed.') . EOL); return false; } |