Welcome to mirror list, hosted at ThFree Co, Russian Federation.

checksetup.php « ajax « settings - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 64718933317ce777ba93ff0d9bcbda4b9c313aef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?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,
		'dataDirectoryProtected' => OC_Util::isHtaccessWorking()
	)
);