mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '4.5' into 4
This commit is contained in:
commit
5bf2ac83ee
@ -56,7 +56,7 @@ Returns the currently logged in [Member](api:SilverStripe\Security\Member) insta
|
|||||||
|
|
||||||
```ss
|
```ss
|
||||||
<% if $CurrentMember %>
|
<% if $CurrentMember %>
|
||||||
Welcome Back, $CurrentMember.FirstName
|
Welcome back, $CurrentMember.FirstName
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class HomePageTest extends FunctionalTest
|
|||||||
$page = $this->get('home/');
|
$page = $this->get('home/');
|
||||||
|
|
||||||
$this->assertExactHTMLMatchBySelector("#Welcome", [
|
$this->assertExactHTMLMatchBySelector("#Welcome", [
|
||||||
'Welcome Back'
|
'Welcome back'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ en:
|
|||||||
SURNAME: Surname
|
SURNAME: Surname
|
||||||
VALIDATIONADMINLOSTACCESS: 'Cannot remove all admin groups from your profile'
|
VALIDATIONADMINLOSTACCESS: 'Cannot remove all admin groups from your profile'
|
||||||
ValidationIdentifierFailed: 'Can''t overwrite existing member #{id} with identical identifier ({name} = {value}))'
|
ValidationIdentifierFailed: 'Can''t overwrite existing member #{id} with identical identifier ({name} = {value}))'
|
||||||
WELCOMEBACK: 'Welcome Back, {firstname}'
|
WELCOMEBACK: 'Welcome back, {firstname}'
|
||||||
YOUROLDPASSWORD: 'Your old password'
|
YOUROLDPASSWORD: 'Your old password'
|
||||||
belongs_many_many_Groups: Groups
|
belongs_many_many_Groups: Groups
|
||||||
db_Locale: 'Interface Locale'
|
db_Locale: 'Interface Locale'
|
||||||
|
@ -55,7 +55,7 @@ class MigrationTask extends BuildTask
|
|||||||
|
|
||||||
protected $title = "Database Migrations";
|
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)
|
public function run($request)
|
||||||
{
|
{
|
||||||
|
@ -201,7 +201,7 @@ class LoginHandler extends RequestHandler
|
|||||||
// Welcome message
|
// Welcome message
|
||||||
$message = _t(
|
$message = _t(
|
||||||
'SilverStripe\\Security\\Member.WELCOMEBACK',
|
'SilverStripe\\Security\\Member.WELCOMEBACK',
|
||||||
'Welcome Back, {firstname}',
|
'Welcome back, {firstname}',
|
||||||
['firstname' => $member->FirstName]
|
['firstname' => $member->FirstName]
|
||||||
);
|
);
|
||||||
Security::singleton()->setSessionMessage($message, ValidationResult::TYPE_GOOD);
|
Security::singleton()->setSessionMessage($message, ValidationResult::TYPE_GOOD);
|
||||||
|
@ -174,6 +174,7 @@ class Diff extends \Diff
|
|||||||
$content = $content ? "true" : "false";
|
$content = $content ? "true" : "false";
|
||||||
}
|
}
|
||||||
if (is_array($content)) {
|
if (is_array($content)) {
|
||||||
|
$content = array_filter($content, 'is_scalar');
|
||||||
// Convert array to CSV
|
// Convert array to CSV
|
||||||
$content = implode(',', $content);
|
$content = implode(',', $content);
|
||||||
}
|
}
|
||||||
|
@ -77,4 +77,14 @@ class DiffTest extends SapphireTest
|
|||||||
|
|
||||||
$this->assertRegExp($expected, $actual);
|
$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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user