BUGFIX Add a unique identifier to the "direction" method for Email::obfuscate() to avoid duplicate custom CSS being included in the page header

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@67681 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-12-08 01:15:59 +00:00 committed by Sam Minnee
parent e4c0b3779d
commit adc2a21232

View File

@ -553,7 +553,10 @@ class Email extends ViewableData {
public static function obfuscate($email, $method = 'visible') {
switch($method) {
case 'direction' :
Requirements::customCSS('span.codedirection { unicode-bidi: bidi-override; direction: rtl; }');
Requirements::customCSS(
'span.codedirection { unicode-bidi: bidi-override; direction: rtl; }',
'codedirectionCSS'
);
return '<span class="codedirection">' . strrev($email) . '</span>';
case 'visible' :
$obfuscated = array('@' => ' [at] ', '.' => ' [dot] ', '-' => ' [dash] ');