2011-09-28 15:52:26 +04:00
|
|
|
<?php
|
|
|
|
/**
|
2015-02-23 13:28:53 +03:00
|
|
|
* @author Andreas Fischer <bantu@owncloud.com>
|
|
|
|
* @author Christopher Schäpers <kondou@ts.unde.re>
|
|
|
|
* @author Frank Karlitschek <frank@owncloud.org>
|
|
|
|
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
|
|
|
|
* @author Masaki Kawabata Neto <masaki.kawabata@gmail.com>
|
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2015, ownCloud, Inc.
|
|
|
|
* @license AGPL-3.0
|
|
|
|
*
|
|
|
|
* This code is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3,
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*
|
|
|
|
*/
|
2013-06-10 15:45:19 +04:00
|
|
|
try {
|
2011-09-28 15:52:26 +04:00
|
|
|
|
2013-06-10 15:45:19 +04:00
|
|
|
require_once 'lib/base.php';
|
2011-09-28 15:52:26 +04:00
|
|
|
|
2014-12-04 18:48:07 +03:00
|
|
|
$systemConfig = \OC::$server->getSystemConfig();
|
|
|
|
|
|
|
|
$installed = $systemConfig->getValue('installed') == 1;
|
|
|
|
$maintenance = $systemConfig->getValue('maintenance', false);
|
2013-06-10 15:45:19 +04:00
|
|
|
$values=array(
|
|
|
|
'installed'=>$installed,
|
2013-07-04 16:28:12 +04:00
|
|
|
'maintenance' => $maintenance,
|
2013-06-10 15:45:19 +04:00
|
|
|
'version'=>implode('.', OC_Util::getVersion()),
|
|
|
|
'versionstring'=>OC_Util::getVersionString(),
|
|
|
|
'edition'=>OC_Util::getEditionString());
|
2013-08-29 17:03:58 +04:00
|
|
|
if (OC::$CLI) {
|
2013-08-29 22:03:16 +04:00
|
|
|
print_r($values);
|
2013-08-29 17:03:58 +04:00
|
|
|
} else {
|
2014-04-26 16:50:34 +04:00
|
|
|
echo json_encode($values);
|
2013-08-29 17:03:58 +04:00
|
|
|
}
|
2013-06-10 15:45:19 +04:00
|
|
|
|
|
|
|
} catch (Exception $ex) {
|
|
|
|
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
|
|
|
|
\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
|
2013-08-18 13:02:08 +04:00
|
|
|
}
|