Skip to content

Commit

Permalink
Merge branch '3.0' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 14, 2025
2 parents 1cf176b + ee61bd5 commit 095d4a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/RestoreAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\Versioned;

use SilverStripe\Core\Convert;
use SilverStripe\ORM\Hierarchy\Hierarchy;
use SilverStripe\Core\Validation\ValidationException;
use SilverStripe\Versioned\Versioned;
Expand Down Expand Up @@ -86,7 +87,7 @@ public static function restore($item)
public static function getRestoreMessage($originalItem, $restoredItem, $changedLocation = false)
{
$restoredID = $restoredItem->Title ?: $restoredItem->ID;
$restoredType = strtolower($restoredItem->i18n_singular_name() ?? '');
$restoredType = Convert::raw2xml(strtolower($restoredItem->i18n_singular_name() ?? ''));

$editLink = $restoredItem->CMSEditLink();
if ($editLink) {
Expand Down
10 changes: 5 additions & 5 deletions src/VersionedGridFieldItemRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public function doArchive($data, $form)
__CLASS__ . '.Archived',
'Archived {name} "{title}"',
[
'name' => $record->i18n_singular_name(),
'title' => $title
'name' => Convert::raw2xml($record->i18n_singular_name()),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
Expand Down Expand Up @@ -146,7 +146,7 @@ public function doPublish($data, $form)
__CLASS__ . '.Published',
'Published {name} {link}',
[
'name' => $record->i18n_singular_name(),
'name' => Convert::raw2xml($record->i18n_singular_name()),
'link' => $link
]
);
Expand Down Expand Up @@ -190,8 +190,8 @@ public function doUnpublish($data, $form)
__CLASS__ . '.Unpublished',
'Unpublished {name} "{title}"',
[
'name' => $record->i18n_singular_name(),
'title' => $title
'name' => Convert::raw2xml($record->i18n_singular_name()),
'title' => Convert::raw2xml($title)
]
);
$this->setFormMessage($form, $message);
Expand Down

0 comments on commit 095d4a7

Please sign in to comment.