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:
Ingo Schommer 2007-09-16 00:58:31 +00:00
parent 226afd84ba
commit 137f302fbc

View File

@ -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;