Skip to content

Commit

Permalink
Merge branch '5.3' into 5
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 9, 2025
2 parents 3518d8a + 4e151be commit 533c0eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Dev/BulkLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function load($filepath)
if (!$record->canDelete()) {
$type = $record->i18n_singular_name();
throw new HTTPResponse_Exception(
_t(__CLASS__ . '.CANNOT_DELETE', "Not allowed to delete '$type' records"),
_t(__CLASS__ . '.CANNOT_DELETE', "Not allowed to delete '{type}' records", ["type" => $type]),
403
);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Dev/CsvBulkLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ protected function processRecord($record, $columnMap, &$results, $preview = fals
if ($this->getCheckPermissions() && !$preview && $alreadyExists && !$existingObj->canEdit()) {
$type = $existingObj->i18n_singular_name();
throw new HTTPResponse_Exception(
_t(BulkLoader::class . '.CANNOT_EDIT', "Not allowed to edit '$type' records"),
_t(BulkLoader::class . '.CANNOT_EDIT', "Not allowed to edit '{type}' records", ["type" => $type]),
403
);
}
Expand All @@ -197,7 +197,7 @@ protected function processRecord($record, $columnMap, &$results, $preview = fals
if ($this->getCheckPermissions() && !$preview && !$alreadyExists && !$obj->canCreate()) {
$type = $obj->i18n_singular_name();
throw new HTTPResponse_Exception(
_t(BulkLoader::class . '.CANNOT_CREATE', "Not allowed to create '$type' records"),
_t(BulkLoader::class . '.CANNOT_CREATE', "Not allowed to create '{type}' records", ["type" => $type]),
403
);
}
Expand Down Expand Up @@ -233,7 +233,7 @@ protected function processRecord($record, $columnMap, &$results, $preview = fals
if ($this->getCheckPermissions() && !$relationObj->canCreate()) {
$type = $relationObj->i18n_singular_name();
throw new HTTPResponse_Exception(
_t(BulkLoader::class . '.CANNOT_CREATE', "Not allowed to create '$type' records"),
_t(BulkLoader::class . '.CANNOT_CREATE', "Not allowed to create '{type}' records", ["type" => $type]),
403
);
}
Expand All @@ -255,7 +255,7 @@ protected function processRecord($record, $columnMap, &$results, $preview = fals
if ($this->getCheckPermissions() && !$relationObj->canEdit()) {
$type = $relationObj->i18n_singular_name();
throw new HTTPResponse_Exception(
_t(BulkLoader::class . '.CANNOT_EDIT', "Not allowed to edit '$type' records"),
_t(BulkLoader::class . '.CANNOT_EDIT', "Not allowed to edit '{type}' records", ["type" => $type]),
403
);
}
Expand Down

0 comments on commit 533c0eb

Please sign in to comment.