mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
elofgren: Remove 6 lines of code by directly passing the unsent_subscribers_array data to push(new ArrayData?($data)) instead of pointlessly creating a new array.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41997 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
226afd84ba
commit
137f302fbc
@ -71,13 +71,7 @@ class Newsletter extends DataObject {
|
||||
// Create new data object set containing the subscribers who have not been sent this newsletter:
|
||||
$unsent_subscribers = new DataObjectSet();
|
||||
foreach($unsent_subscribers_array as $key => $data) {
|
||||
$record = array(
|
||||
'ID' => $data['ID'],
|
||||
'FirstName' => $data['FirstName'],
|
||||
'Surname' => $data['Surname'],
|
||||
'Email' => $data['Email']
|
||||
);
|
||||
$unsent_subscribers->push(new ArrayData($record));
|
||||
$unsent_subscribers->push(new ArrayData($data));
|
||||
}
|
||||
|
||||
return $unsent_subscribers;
|
||||
|
Loading…
Reference in New Issue
Block a user