blob: 6bf5bc5642e9beff814647116f56af9a6dd45421 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
/**
* 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.
*/
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(
array(
'serverhasinternetconnection' => $hasInternet
)
);
|