diff options
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 + ) +); |