Skip to content

Commit

Permalink
Merge branch '4'
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Apr 1, 2020
2 parents 740e1aa + 5bf2ac8 commit 88eabc7
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 7 deletions.
Expand Up @@ -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 %>
```

Expand Down
Expand Up @@ -47,7 +47,7 @@ class HomePageTest extends FunctionalTest
$page = $this->get('home/');

$this->assertExactHTMLMatchBySelector("#Welcome", [
'Welcome Back'
'Welcome back'
]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/en/02_Developer_Guides/13_i18n/index.md
Expand Up @@ -244,7 +244,7 @@ en:
SINGULARNAME: 'object'
PLURALNAME: 'objects'
PLURALS:
one: 'An object',
one: 'An object'
other: '{count} objects'
```

Expand Down
2 changes: 1 addition & 1 deletion lang/en.yml
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion src/Dev/MigrationTask.php
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Member.php
Expand Up @@ -793,7 +793,7 @@ public static function currentUser()
*
* E.g.
* <code>
* Member::logInAs(Security::findAnAdministrator(), function() {
* Member::actAs(Security::findAnAdministrator(), function() {
* $record->write();
* });
* </code>
Expand Down
2 changes: 1 addition & 1 deletion src/Security/MemberAuthenticator/LoginHandler.php
Expand Up @@ -201,7 +201,7 @@ protected function redirectAfterSuccessfulLogin()
// Welcome message
$message = _t(
'SilverStripe\\Security\\Member.WELCOMEBACK',
'Welcome Back, {firstname}',
'Welcome back, {firstname}',
['firstname' => $member->FirstName]
);
Security::singleton()->setSessionMessage($message, ValidationResult::TYPE_GOOD);
Expand Down
1 change: 1 addition & 0 deletions src/View/Parsers/Diff.php
Expand Up @@ -174,6 +174,7 @@ public static function getHTMLChunks($content)
$content = $content ? "true" : "false";
}
if (is_array($content)) {
$content = array_filter($content, 'is_scalar');
// Convert array to CSV
$content = implode(',', $content);
}
Expand Down
10 changes: 10 additions & 0 deletions tests/php/View/Parsers/DiffTest.php
Expand Up @@ -77,4 +77,14 @@ public function testLegacyEachStatement()

$this->assertRegExp($expected, $actual);
}

public function testDiffArray()
{
$from = ['Lorem', ['array here please ignore'], 'ipsum dolor'];
$to = 'Lorem,ipsum';
$expected = "/^Lorem,ipsum *<del>dolor<\/del> *$/";
$actual = Diff::compareHTML($from, $to);

$this->assertRegExp($expected, $actual);
}
}

0 comments on commit 88eabc7

Please sign in to comment.