elofgren: BUGFIX: Fix Email_BlackList::isBlocked() to check the Email_BlackList.BlockedEmail? field instead of non-existant Email field so that it will actaully return true when an email is blocked.

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42025 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-16 01:54:32 +00:00
parent f4f6eb0333
commit 4622ce38fc

View File

@ -917,7 +917,7 @@ class Email_BlackList extends DataObject{
* sent has specifically been blocked.
*/
static function isBlocked($email){
$blockedEmails = DataObject::get("Email_BlackList")->toDropDownMap("ID","Email");
$blockedEmails = DataObject::get("Email_BlackList")->toDropDownMap("ID","BlockedEmail");
if($blockedEmails){
if(in_array($email,$blockedEmails)){
return true;