mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Fix bulk move/group action log names when unsetting location/group #669
This commit is contained in:
parent
a13a0de10a
commit
2b3bb21683
3 changed files with 12 additions and 2 deletions
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- [Fix bulk move/group action log names when unsetting location/group #669](https://github.com/farmOS/farmOS/pull/669)
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
- Update Drupal core to 9.5.8 for [SA-CORE-2023-005](https://www.drupal.org/sa-core-2023-005)
|
- Update Drupal core to 9.5.8 for [SA-CORE-2023-005](https://www.drupal.org/sa-core-2023-005)
|
||||||
|
|
|
@ -200,7 +200,10 @@ class AssetGroupActionForm extends ConfirmFormBase {
|
||||||
// Generate a name for the log.
|
// Generate a name for the log.
|
||||||
$asset_names = farm_log_asset_names_summary($accessible_entities);
|
$asset_names = farm_log_asset_names_summary($accessible_entities);
|
||||||
$group_names = farm_log_asset_names_summary($groups);
|
$group_names = farm_log_asset_names_summary($groups);
|
||||||
|
$log_name = $this->t('Clear group membership of @assets', ['@assets' => $asset_names]);
|
||||||
|
if (!empty($group_names)) {
|
||||||
$log_name = $this->t('Group @assets into @groups', ['@assets' => $asset_names, '@groups' => $group_names]);
|
$log_name = $this->t('Group @assets into @groups', ['@assets' => $asset_names, '@groups' => $group_names]);
|
||||||
|
}
|
||||||
|
|
||||||
// Create the log.
|
// Create the log.
|
||||||
$log = Log::create([
|
$log = Log::create([
|
||||||
|
|
|
@ -230,7 +230,10 @@ class AssetMoveActionForm extends ConfirmFormBase {
|
||||||
// Generate a name for the log.
|
// Generate a name for the log.
|
||||||
$asset_names = farm_log_asset_names_summary($accessible_entities);
|
$asset_names = farm_log_asset_names_summary($accessible_entities);
|
||||||
$location_names = farm_log_asset_names_summary($locations);
|
$location_names = farm_log_asset_names_summary($locations);
|
||||||
|
$log_name = $this->t('Clear location of @assets', ['@assets' => $asset_names]);
|
||||||
|
if (!empty($location_names)) {
|
||||||
$log_name = $this->t('Move @assets to @locations', ['@assets' => $asset_names, '@locations' => $location_names]);
|
$log_name = $this->t('Move @assets to @locations', ['@assets' => $asset_names, '@locations' => $location_names]);
|
||||||
|
}
|
||||||
|
|
||||||
// Create the log.
|
// Create the log.
|
||||||
$log = Log::create([
|
$log = Log::create([
|
||||||
|
|
Loading…
Reference in a new issue