Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 7.2 into 7 #921

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -258,7 +259,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 @@ -304,7 +305,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 @@ -338,7 +339,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 @@ -388,7 +389,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 @@ -436,7 +437,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 @@ -480,7 +481,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 @@ -511,8 +512,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 @@ -544,8 +545,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
Loading