From 29454fd5713270a921b6e2546b4ac5e0c1ca1dc4 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 9 Jan 2013 20:09:48 +0000 Subject: [PATCH] fixed hidden types --- lam/templates/config/conftypes.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lam/templates/config/conftypes.php b/lam/templates/config/conftypes.php index 222ee925..27e75cdf 100644 --- a/lam/templates/config/conftypes.php +++ b/lam/templates/config/conftypes.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2012 Roland Gruber + Copyright (C) 2004 - 2013 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -366,9 +366,15 @@ function checkInput() { elseif (substr($key, 0, 7) == "filter_") { $typeSettings[$key] = $_POST[$key]; } - // set hidden - elseif (substr($key, 0, 7) == "hidden_") { - $typeSettings[$key] = ($_POST[$key] == 'on'); + } + // set hidden + for ($i = 0; $i < sizeof($accountTypes); $i++) { + $key = "hidden_" . $accountTypes[$i]; + if (isset($_POST[$key]) && ($_POST[$key] == 'on')) { + $typeSettings[$key] = true; + } + else { + $typeSettings[$key] = false; } } // save input