server/settings/ajax/checksetup.php
Vincent Petry e65ceb08fc Moved WebDAV and internet checks to client side JS
- Added setup checks in JavaScript
- Moved isWebDAVWorking to JS using SetupChecks
- Moved internet connection checks to an ajax call that goes through the
  server
2014-09-23 11:16:14 +02:00

23 lines
556 B
PHP

<?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
)
);