enable usage with CLI interface
Added option to use the status.php with console.php via CLI
This commit is contained in:
parent
4db6ed34b8
commit
1dd18980ae
|
@ -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) {
|
||||||
|
print_r($values);
|
||||||
|
} else {
|
||||||
echo(json_encode($values));
|
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);
|
||||||
|
|
Loading…
Reference in New Issue