summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-01 02:37:35 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-01 02:37:35 +0200
commit687f5e1088d27fe5d8aad7478254f4281f347a84 (patch)
tree3028413b3b54402309d2dc440d82b5373c69ed58
parent5c72e4a7010e681dc18cae6f8ade0225cc21c53b (diff)
downloadwebadmin-687f5e1088d27fe5d8aad7478254f4281f347a84.tar.gz
Attributes posted and also "static" forms should be preserved (as posted)
-rw-r--r--lib/api/kolab_api_service_group.php12
-rw-r--r--lib/api/kolab_api_service_user.php12
2 files changed, 20 insertions, 4 deletions
diff --git a/lib/api/kolab_api_service_group.php b/lib/api/kolab_api_service_group.php
index 3e82f0d..9ff1835 100644
--- a/lib/api/kolab_api_service_group.php
+++ b/lib/api/kolab_api_service_group.php
@@ -91,7 +91,11 @@ class kolab_api_service_group extends kolab_api_service
if (isset($gta['fields'])) {
foreach ($gta['fields'] as $key => $value) {
- $group_attributes[$key] = $gta['fields'][$key];
+ if (empty($postdata[$key])) {
+ $group_attributes[$key] = $gta['fields'][$key];
+ } else {
+ $group_attributes[$key] = $postdata[$key];
+ }
}
}
@@ -193,7 +197,11 @@ class kolab_api_service_group extends kolab_api_service
if (isset($gta['fields'])) {
foreach ($gta['fields'] as $key => $value) {
- $group_attributes[$key] = $gta['fields'][$key];
+ if (empty($postdata[$key])) {
+ $group_attributes[$key] = $gta['fields'][$key];
+ } else {
+ $group_attributes[$key] = $postdata[$key];
+ }
}
$group_attributes[$unique_attr] = $postdata[$unique_attr];
diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index a5c58e2..0bce631 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -98,7 +98,11 @@ class kolab_api_service_user extends kolab_api_service
if (isset($uta['fields'])) {
foreach ($uta['fields'] as $key => $value) {
- $user_attributes[$key] = $uta['fields'][$key];
+ if (empty($postdata[$key])) {
+ $user_attributes[$key] = $uta['fields'][$key];
+ } else {
+ $user_attributes[$key] = $uta['fields'][$key];
+ }
}
}
@@ -204,7 +208,11 @@ class kolab_api_service_user extends kolab_api_service
if (isset($uta['fields'])) {
foreach ($uta['fields'] as $key => $value) {
- $user_attributes[$key] = $uta['fields'][$key];
+ if (empty($postdata[$key])) {
+ $user_attributes[$key] = $uta['fields'][$key];
+ } else {
+ $user_attributes[$key] = $postdata[$key];
+ }
}
$user_attributes[$unique_attr] = $postdata[$unique_attr];