2011-09-28 11:52:26 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2015-03-26 10:44:34 +00: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>
|
2015-10-05 18:54:56 +00:00
|
|
|
* @author Lukas Reschke <lukas@owncloud.com>
|
2015-03-26 10:44:34 +00:00
|
|
|
* @author Masaki Kawabata Neto <masaki.kawabata@gmail.com>
|
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
*
|
2016-01-12 14:02:16 +00:00
|
|
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
2015-03-26 10:44:34 +00:00
|
|
|
* @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/>
|
|
|
|
*
|
|
|
|
*/
|
2015-02-26 10:37:37 +00:00
|
|
|
|
2013-06-10 11:45:19 +00:00
|
|
|
try {
|
2011-09-28 11:52:26 +00:00
|
|
|
|
2013-06-10 11:45:19 +00:00
|
|
|
require_once 'lib/base.php';
|
2011-09-28 11:52:26 +00:00
|
|
|
|
2014-12-04 15:48:07 +00:00
|
|
|
$systemConfig = \OC::$server->getSystemConfig();
|
|
|
|
|
2016-05-23 08:09:36 +00:00
|
|
|
$installed = (bool) $systemConfig->getValue('installed', false);
|
|
|
|
$maintenance = (bool) $systemConfig->getValue('maintenance', false);
|
2013-06-10 11:45:19 +00:00
|
|
|
$values=array(
|
|
|
|
'installed'=>$installed,
|
2013-07-04 12:28:12 +00:00
|
|
|
'maintenance' => $maintenance,
|
2015-12-18 14:26:54 +00:00
|
|
|
'version'=>implode('.', \OCP\Util::getVersion()),
|
2013-06-10 11:45:19 +00:00
|
|
|
'versionstring'=>OC_Util::getVersionString(),
|
|
|
|
'edition'=>OC_Util::getEditionString());
|
2013-08-29 13:03:58 +00:00
|
|
|
if (OC::$CLI) {
|
2013-08-29 18:03:16 +00:00
|
|
|
print_r($values);
|
2013-08-29 13:03:58 +00:00
|
|
|
} else {
|
2015-08-22 12:44:02 +00:00
|
|
|
header('Access-Control-Allow-Origin: *');
|
2015-04-08 16:02:00 +00:00
|
|
|
header('Content-Type: application/json');
|
2014-04-26 12:50:34 +00:00
|
|
|
echo json_encode($values);
|
2013-08-29 13:03:58 +00:00
|
|
|
}
|
2013-06-10 11:45:19 +00: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 09:02:08 +00:00
|
|
|
}
|