diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-02-03 12:48:17 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-09-23 11:16:14 +0200 |
commit | e65ceb08fc4a56d0fb9e4be5d51ba04168cbb59a (patch) | |
tree | 72f9a407f9f0a653ad534a1aec4df76837d15ef8 /settings/ajax | |
parent | fc42a64e6c848adc21bb069da01398f7d39fcc4a (diff) | |
download | nextcloud-server-e65ceb08fc4a56d0fb9e4be5d51ba04168cbb59a.tar.gz nextcloud-server-e65ceb08fc4a56d0fb9e4be5d51ba04168cbb59a.zip |
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
Diffstat (limited to 'settings/ajax')
-rw-r--r-- | settings/ajax/checksetup.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/settings/ajax/checksetup.php b/settings/ajax/checksetup.php new file mode 100644 index 00000000000..6bf5bc5642e --- /dev/null +++ b/settings/ajax/checksetup.php @@ -0,0 +1,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 + ) +); |