| @@ 558-562 (lines=5) @@ | ||
| 555 | preg_match_all('~"([^"]+)"~', $_POST[$type], $matches); |
|
| 556 | $_POST[$type] = array_unique(array_merge($matches[1], explode(',', preg_replace('~"[^"]+"~', '', $_POST[$type])))); |
|
| 557 | ||
| 558 | foreach ($_POST[$type] as $index => $member) |
|
| 559 | if (strlen(trim($member)) > 0) |
|
| 560 | $_POST[$type][$index] = $smcFunc['htmlspecialchars']($smcFunc['strtolower'](trim($member))); |
|
| 561 | else |
|
| 562 | unset($_POST[$type][$index]); |
|
| 563 | ||
| 564 | // Find the members |
|
| 565 | $_POST[$type] = implode(',', array_keys(findMembers($_POST[$type]))); |
|
| @@ 2296-2302 (lines=7) @@ | ||
| 2293 | preg_match_all('~"([^"]+)"~', $recipientString, $matches); |
|
| 2294 | $namedRecipientList[$recipientType] = array_unique(array_merge($matches[1], explode(',', preg_replace('~"[^"]+"~', '', $recipientString)))); |
|
| 2295 | ||
| 2296 | foreach ($namedRecipientList[$recipientType] as $index => $recipient) |
|
| 2297 | { |
|
| 2298 | if (strlen(trim($recipient)) > 0) |
|
| 2299 | $namedRecipientList[$recipientType][$index] = $smcFunc['htmlspecialchars']($smcFunc['strtolower'](trim($recipient))); |
|
| 2300 | else |
|
| 2301 | unset($namedRecipientList[$recipientType][$index]); |
|
| 2302 | } |
|
| 2303 | ||
| 2304 | if (!empty($namedRecipientList[$recipientType])) |
|
| 2305 | { |
|