From 2aafbdfb2cea7b8fc7daeb60ccfbb7f6357f77e5 Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 17 Aug 2008 14:37:32 +0000 Subject: Ensuring that tags are saved correctly in profile git-svn-id: https://code.elgg.org/elgg/trunk@1980 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/actions/edit.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php index c3673e4e6..36f13eb42 100644 --- a/mod/profile/actions/edit.php +++ b/mod/profile/actions/edit.php @@ -47,8 +47,11 @@ $access_id = 0; } if (is_array($value)) { + $i = 0; foreach($value as $interval) { - create_metadata($user->guid, $shortname, $interval, 'text', $user->guid, $access_id, true); + $i++; + if ($i == 1) { $multiple = false; } else { $multiple = true; } + create_metadata($user->guid, $shortname, $interval, 'text', $user->guid, $access_id, $multiple); } } else { create_metadata($user->guid, $shortname, $value, 'text', $user->guid, $access_id); -- cgit v1.2.3