[Pkg-owncloud-commits] [owncloud] 36/49: LDAP: make unsetting checkboxes from Advanced tab work again, fixes #6143

David Prévot taffit at moszumanska.debian.org
Thu Dec 5 16:02:55 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 328ebaefde35790fff143aae699751985deae456
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Wed Dec 4 13:14:05 2013 +0100

    LDAP: make unsetting checkboxes from Advanced tab work again, fixes #6143
---
 apps/user_ldap/ajax/setConfiguration.php | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/apps/user_ldap/ajax/setConfiguration.php b/apps/user_ldap/ajax/setConfiguration.php
index 94de883..84acece 100644
--- a/apps/user_ldap/ajax/setConfiguration.php
+++ b/apps/user_ldap/ajax/setConfiguration.php
@@ -27,6 +27,18 @@ OCP\JSON::checkAppEnabled('user_ldap');
 OCP\JSON::callCheck();
 
 $prefix = $_POST['ldap_serverconfig_chooser'];
+
+// Checkboxes are not submitted, when they are unchecked. Set them manually.
+// only legacy checkboxes (Advanced and Expert tab) need to be handled here,
+// the Wizard-like tabs handle it on their own
+$chkboxes = array('ldap_configuration_active', 'ldap_override_main_server',
+				  'ldap_nocase', 'ldap_turn_off_cert_check');
+foreach($chkboxes as $boxid) {
+	if(!isset($_POST[$boxid])) {
+		$_POST[$boxid] = 0;
+	}
+}
+
 $ldapWrapper = new OCA\user_ldap\lib\LDAP();
 $connection = new \OCA\user_ldap\lib\Connection($ldapWrapper, $prefix);
 $connection->setConfiguration($_POST);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list