2014-02-03 11:48:17 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2015-02-26 10:37:37 +00:00
|
|
|
* Copyright (c) 2014, Vincent Petry <pvince81@owncloud.com>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
|
|
* See the COPYING-README file.
|
2014-02-03 11:48:17 +00:00
|
|
|
*/
|
2015-02-26 10:37:37 +00:00
|
|
|
|
2014-02-03 11:48:17 +00:00
|
|
|
OCP\JSON::checkAdminUser();
|
|
|
|
OCP\JSON::callCheck();
|
|
|
|
|
|
|
|
\OC::$server->getSession()->close();
|
|
|
|
|
|
|
|
// no warning when has_internet_connection is false in the config
|
|
|
|
$hasInternet = true;
|
|
|
|
if (OC_Util::isInternetConnectionEnabled()) {
|
|
|
|
$hasInternet = OC_Util::isInternetConnectionWorking();
|
|
|
|
}
|
|
|
|
|
|
|
|
OCP\JSON::success(
|
2014-12-06 14:34:53 +00:00
|
|
|
array (
|
|
|
|
'serverHasInternetConnection' => $hasInternet,
|
|
|
|
'dataDirectoryProtected' => OC_Util::isHtaccessWorking()
|
2014-02-03 11:48:17 +00:00
|
|
|
)
|
|
|
|
);
|