summaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-14 10:33:17 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-01-14 10:33:17 +0100
commitcd802ed45bca8fabb0252e40ab14fa8bb0f935ec (patch)
treeaf942be7c337826104cefb31b02755f75e3d9efa /settings/ajax
parente0173303e6a3ff2048422f47db7ce3d97a70c761 (diff)
parentc29310aaef636b98e52672e3005343aa6f978076 (diff)
downloadnextcloud-server-cd802ed45bca8fabb0252e40ab14fa8bb0f935ec.tar.gz
nextcloud-server-cd802ed45bca8fabb0252e40ab14fa8bb0f935ec.zip
Merge branch 'master' of github.com:owncloud/core
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/disableapp.php1
-rw-r--r--settings/ajax/enableapp.php1
-rw-r--r--settings/ajax/openid.php16
-rw-r--r--settings/ajax/setsecurity.php13
4 files changed, 13 insertions, 18 deletions
diff --git a/settings/ajax/disableapp.php b/settings/ajax/disableapp.php
index a39b06b9c7d..e89de928eac 100644
--- a/settings/ajax/disableapp.php
+++ b/settings/ajax/disableapp.php
@@ -1,7 +1,6 @@
<?php
OC_JSON::checkAdminUser();
OCP\JSON::callCheck();
-OC_JSON::setContentTypeHeader();
OC_App::disable($_POST['appid']);
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php
index f4d5c53adef..18202dc39e9 100644
--- a/settings/ajax/enableapp.php
+++ b/settings/ajax/enableapp.php
@@ -2,7 +2,6 @@
OC_JSON::checkAdminUser();
OCP\JSON::callCheck();
-OC_JSON::setContentTypeHeader();
$appid = OC_App::enable($_POST['appid']);
if($appid !== false) {
diff --git a/settings/ajax/openid.php b/settings/ajax/openid.php
deleted file mode 100644
index 23c43c3c48e..00000000000
--- a/settings/ajax/openid.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-$l=OC_L10N::get('settings');
-
-OC_JSON::checkLoggedIn();
-OCP\JSON::callCheck();
-OC_JSON::checkAppEnabled('user_openid');
-
-// Get data
-if( isset( $_POST['identity'] ) ) {
- $identity=$_POST['identity'];
- OC_Preferences::setValue(OC_User::getUser(), 'user_openid', 'identity', $identity);
- OC_JSON::success(array("data" => array( "message" => $l->t("OpenID Changed") )));
-}else{
- OC_JSON::error(array("data" => array( "message" => $l->t("Invalid request") )));
-}
diff --git a/settings/ajax/setsecurity.php b/settings/ajax/setsecurity.php
new file mode 100644
index 00000000000..16a85aade81
--- /dev/null
+++ b/settings/ajax/setsecurity.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright (c) 2013, Lukas Reschke <lukas@statuscode.ch>
+ * This file is licensed under the Affero General Public License version 3 or later.
+ * See the COPYING-README file.
+ */
+
+OC_Util::checkAdminUser();
+OCP\JSON::callCheck();
+
+OC_Config::setValue( 'forcessl', filter_var($_POST['enforceHTTPS'], FILTER_VALIDATE_BOOLEAN));
+
+echo 'true'; \ No newline at end of file