Overview
Comment:Fix: multiple values fields first value was not imported correctly
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: 2506e46fdcfccaf4859e479c2812f3fe92ac05ff5cac38bf6a6cc1d78a1a4c37
User & Date: bohwaz on 2021-05-22 11:06:47
Other Links: manifest | tags
Context
2021-05-22
11:21
Fix hover on even rows in selectors check-in: 89013f983a user: bohwaz tags: trunk, stable
11:06
Fix: multiple values fields first value was not imported correctly check-in: 2506e46fdc user: bohwaz tags: trunk, stable
04:02
Make sure to remove punctuation as well check-in: 0b821fce4f user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Membres/Import.php from [2afb2583d8] to [33ecedf27d].

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
					$values = explode(';', $data[$name]);
					$data[$name] = 0;

					foreach ($values as $v) {
						$v = trim($v);
						$found = array_search($v, $champs_multiples[$name]->options);

						if ($found) {
							$data[$name] |= 0x01 << $found;
						}
					}
				}
			}

			if (!empty($data['numero']) && $data['numero'] > 0)







|







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
					$values = explode(';', $data[$name]);
					$data[$name] = 0;

					foreach ($values as $v) {
						$v = trim($v);
						$found = array_search($v, $champs_multiples[$name]->options);

						if ($found !== false) {
							$data[$name] |= 0x01 << $found;
						}
					}
				}
			}

			if (!empty($data['numero']) && $data['numero'] > 0)