diff --git a/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md b/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md index 2a85f9dc8..1f86cb8b6 100644 --- a/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md +++ b/docs/en/02_Developer_Guides/01_Templates/02_Common_Variables.md @@ -56,7 +56,7 @@ Returns the currently logged in [Member](api:SilverStripe\Security\Member) insta ```ss <% if $CurrentMember %> - Welcome Back, $CurrentMember.FirstName + Welcome back, $CurrentMember.FirstName <% end_if %> ``` diff --git a/docs/en/02_Developer_Guides/06_Testing/How_Tos/01_Write_a_FunctionalTest.md b/docs/en/02_Developer_Guides/06_Testing/How_Tos/01_Write_a_FunctionalTest.md index 0d887c561..8760c0a6d 100644 --- a/docs/en/02_Developer_Guides/06_Testing/How_Tos/01_Write_a_FunctionalTest.md +++ b/docs/en/02_Developer_Guides/06_Testing/How_Tos/01_Write_a_FunctionalTest.md @@ -47,7 +47,7 @@ class HomePageTest extends FunctionalTest $page = $this->get('home/'); $this->assertExactHTMLMatchBySelector("#Welcome", [ - 'Welcome Back' + 'Welcome back' ]); } } diff --git a/lang/en.yml b/lang/en.yml index dfe2f3812..264ea71aa 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -276,7 +276,7 @@ en: SURNAME: Surname VALIDATIONADMINLOSTACCESS: 'Cannot remove all admin groups from your profile' ValidationIdentifierFailed: 'Can''t overwrite existing member #{id} with identical identifier ({name} = {value}))' - WELCOMEBACK: 'Welcome Back, {firstname}' + WELCOMEBACK: 'Welcome back, {firstname}' YOUROLDPASSWORD: 'Your old password' belongs_many_many_Groups: Groups db_Locale: 'Interface Locale' diff --git a/src/Dev/MigrationTask.php b/src/Dev/MigrationTask.php index d58ad0b80..d96b658bc 100644 --- a/src/Dev/MigrationTask.php +++ b/src/Dev/MigrationTask.php @@ -55,7 +55,7 @@ class MigrationTask extends BuildTask protected $title = "Database Migrations"; - protected $description = "Provide atomic database changes (not implemented yet)"; + protected $description = "Provide atomic database changes (subclass this and implement yourself)"; public function run($request) { diff --git a/src/Security/MemberAuthenticator/LoginHandler.php b/src/Security/MemberAuthenticator/LoginHandler.php index e3728393f..1a5278d0b 100644 --- a/src/Security/MemberAuthenticator/LoginHandler.php +++ b/src/Security/MemberAuthenticator/LoginHandler.php @@ -201,7 +201,7 @@ class LoginHandler extends RequestHandler // Welcome message $message = _t( 'SilverStripe\\Security\\Member.WELCOMEBACK', - 'Welcome Back, {firstname}', + 'Welcome back, {firstname}', ['firstname' => $member->FirstName] ); Security::singleton()->setSessionMessage($message, ValidationResult::TYPE_GOOD); diff --git a/src/View/Parsers/Diff.php b/src/View/Parsers/Diff.php index 2072e854e..f1c314056 100644 --- a/src/View/Parsers/Diff.php +++ b/src/View/Parsers/Diff.php @@ -174,6 +174,7 @@ class Diff extends \Diff $content = $content ? "true" : "false"; } if (is_array($content)) { + $content = array_filter($content, 'is_scalar'); // Convert array to CSV $content = implode(',', $content); } diff --git a/tests/php/View/Parsers/DiffTest.php b/tests/php/View/Parsers/DiffTest.php index e778ffa84..94f851524 100644 --- a/tests/php/View/Parsers/DiffTest.php +++ b/tests/php/View/Parsers/DiffTest.php @@ -77,4 +77,14 @@ class DiffTest extends SapphireTest $this->assertRegExp($expected, $actual); } + + public function testDiffArray() + { + $from = ['Lorem', ['array here please ignore'], 'ipsum dolor']; + $to = 'Lorem,ipsum'; + $expected = "/^Lorem,ipsum *dolor<\/del> *$/"; + $actual = Diff::compareHTML($from, $to); + + $this->assertRegExp($expected, $actual); + } }