11531.patch
| Classes/ExtDirect/ActionHandler.php (working copy) | ||
|---|---|---|
| 246 | 246 |
$additionalRecipients = array(); |
| 247 | 247 |
} |
| 248 | 248 | |
| 249 |
$finalRecipients = array_unique( |
|
| 249 |
$allRecipients = array_unique( |
|
| 250 | 250 |
array_merge($recipients, $additionalRecipients) |
| 251 | 251 |
); |
| 252 | 252 | |
| 253 |
foreach ($allRecipients as $recipient) {
|
|
| 254 |
if (t3lib_div::validEmail($recipient)) {
|
|
| 255 |
$finalRecipients[] = $recipient; |
|
| 256 |
} |
|
| 257 |
} |
|
| 258 | ||
| 253 | 259 |
return $finalRecipients; |
| 254 | 260 |
} |
| 255 | 261 | |
| ... | ... | |
| 443 | 449 | |
| 444 | 450 |
/** |
| 445 | 451 |
* Gets all assigned recipients of a particular stage. |
| 446 |
* |
|
| 452 |
* |
|
| 447 | 453 |
* @param integer $stage |
| 448 | 454 |
* @return array |
| 449 | 455 |
*/ |
| ... | ... | |
| 452 | 458 | |
| 453 | 459 |
$recipients = $this->getStageService()->getResponsibleBeUser($stage); |
| 454 | 460 | |
| 455 |
foreach ($recipients as $id => $name) {
|
|
| 456 |
$result[] = array( |
|
| 457 |
'boxLabel' => $name, |
|
| 458 |
'name' => 'receipients-' . $id, |
|
| 459 |
'checked' => TRUE, |
|
| 460 |
); |
|
| 461 |
foreach ($recipients as $id => $user) {
|
|
| 462 |
if (t3lib_div::validEmail($user['email'])) {
|
|
| 463 |
$name = $user['realName'] ? $user['realName'] : $user['username']; |
|
| 464 |
$result[] = array( |
|
| 465 |
'boxLabel' => sprintf('%s (%s)', $name, $user['email']),
|
|
| 466 |
'name' => 'receipients-' . $id, |
|
| 467 |
'checked' => TRUE, |
|
| 468 |
); |
|
| 469 |
} |
|
| 461 | 470 |
} |
| 462 | 471 | |
| 463 | 472 |
return $result; |
| Classes/Service/Stages.php (working copy) | ||
|---|---|---|
| 416 | 416 | |
| 417 | 417 |
if (!empty($userRecords) && is_array($userRecords)) {
|
| 418 | 418 |
foreach ($userRecords as $userUid => $userRecord) {
|
| 419 |
$recipientArray[$userUid] = $userRecord['email'] . ' ( ' . $userRecord['realName'] . ' )'; |
|
| 419 |
$recipientArray[$userUid] = $userRecord; |
|
| 420 | 420 |
} |
| 421 | 421 |
} |
| 422 | 422 |
return $recipientArray; |