From 137f302fbc509b42f3c1100c15968d1aa67f1838 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 16 Sep 2007 00:58:31 +0000 Subject: [PATCH] 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 --- code/Newsletter/Newsletter.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/code/Newsletter/Newsletter.php b/code/Newsletter/Newsletter.php index bd97ced8..f67e093f 100755 --- a/code/Newsletter/Newsletter.php +++ b/code/Newsletter/Newsletter.php @@ -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;