enable usage with CLI interface

Added option to use the status.php with console.php via CLI
This commit is contained in:
Masaki Kawabata Neto 2013-08-29 10:03:58 -03:00
parent 4db6ed34b8
commit 1dd18980ae
1 changed files with 5 additions and 2 deletions

View File

@ -33,8 +33,11 @@ try {
'version'=>implode('.', OC_Util::getVersion()), 'version'=>implode('.', OC_Util::getVersion()),
'versionstring'=>OC_Util::getVersionString(), 'versionstring'=>OC_Util::getVersionString(),
'edition'=>OC_Util::getEditionString()); 'edition'=>OC_Util::getEditionString());
if (OC::$CLI) {
echo(json_encode($values)); print_r($values);
} else {
echo(json_encode($values));
}
} catch (Exception $ex) { } catch (Exception $ex) {
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);