Skip to content

Commit

Permalink
Merge pull request tractorcow-farm#921 from tractorcow-farm/7.2
Browse files Browse the repository at this point in the history
Merge 7.2 into 7
  • Loading branch information
tractorcow authored Jan 14, 2025
2 parents 19d9b1c + 43e2ab9 commit 7a04530
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/Extension/Traits/FluentAdminTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Core\Convert;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\FormAction;
Expand Down Expand Up @@ -263,7 +264,7 @@ public function clearFluent($data, $form)
$message = _t(
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.ClearAllNotice',
"All localisations have been cleared for '{title}'.",
['title' => $record->Title]
['title' => Convert::raw2xml($record->Title)]
);

$record->flushCache(true);
Expand Down Expand Up @@ -309,7 +310,7 @@ public function copyFluent($data, $form)
$message = _t(
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.CopyNotice',
"Copied '{title}' to all other locales.",
['title' => $record->Title]
['title' => Convert::raw2xml($record->Title)]
);

$record->flushCache(true);
Expand Down Expand Up @@ -343,7 +344,7 @@ public function unpublishFluent($data, $form)
$message = _t(
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.UnpublishNotice',
"Unpublished '{title}' from all locales.",
['title' => $record->Title]
['title' => Convert::raw2xml($record->Title)]
);

$record->flushCache(true);
Expand Down Expand Up @@ -393,7 +394,7 @@ public function archiveFluent($data, $form)
$message = _t(
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.ArchiveNotice',
"Archived '{title}' and all of its localisations.",
['title' => $record->Title]
['title' => Convert::raw2xml($record->Title)]
);

$record->flushCache(true);
Expand Down Expand Up @@ -441,7 +442,7 @@ public function deleteFluent($data, $form)
$message = _t(
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.DeleteNotice',
"Deleted '{title}' and all of its localisations.",
['title' => $record->Title]
['title' => Convert::raw2xml($record->Title)]
);

$record->flushCache(true);
Expand Down Expand Up @@ -485,7 +486,7 @@ public function publishFluent($data, $form)
$message = _t(
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.PublishNotice',
"Published '{title}' across all locales.",
['title' => $record->Title]
['title' => Convert::raw2xml($record->Title)]
);

$record->flushCache(true);
Expand Down Expand Up @@ -516,8 +517,8 @@ public function showFluent($data, $form)
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.ShowNotice',
"Record '{title}' is now visible in {locale}",
[
'title' => $record->Title,
'locale' => $locale->Title
'title' => Convert::raw2xml($record->Title),
'locale' => Convert::raw2xml($locale->Title),
]
);

Expand Down Expand Up @@ -549,8 +550,8 @@ public function hideFluent($data, $form)
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.HideNotice',
"Record '{title}' is now hidden in {locale}",
[
'title' => $record->Title,
'locale' => $locale->Title
'title' => Convert::raw2xml($record->Title),
'locale' => Convert::raw2xml($locale->Title),
]
);

Expand Down

0 comments on commit 7a04530

Please sign in to comment.