fix: [metaTemplates] Correctly show update message
parent
455daba4d4
commit
0f27435251
|
@ -27,9 +27,9 @@ class MetaTemplatesController extends AppController
|
||||||
return $this->RestResponse->viewData($result, 'json');
|
return $this->RestResponse->viewData($result, 'json');
|
||||||
} else {
|
} else {
|
||||||
if ($result['success']) {
|
if ($result['success']) {
|
||||||
$message = __n('{0} templates updated.', 'The template has been updated.', empty($template_id), $result['files_processed']);
|
$message = __n('{0} templates updated.', 'The template has been updated.', empty($template_id), count($result['files_processed']));
|
||||||
} else {
|
} else {
|
||||||
$message = __n('{0} templates could not be updated.', 'The template could not be updated.', empty($template_id), $result['files_processed']);
|
$message = __n('{0} templates could not be updated.', 'The template could not be updated.', empty($template_id), count($result['files_processed']));
|
||||||
}
|
}
|
||||||
$this->CRUD->setResponseForController('updateAllTemplate', $result['success'], $message, $result['files_processed'], $result['update_errors'], ['redirect' => $this->referer()]);
|
$this->CRUD->setResponseForController('updateAllTemplate', $result['success'], $message, $result['files_processed'], $result['update_errors'], ['redirect' => $this->referer()]);
|
||||||
$responsePayload = $this->CRUD->getResponsePayload();
|
$responsePayload = $this->CRUD->getResponsePayload();
|
||||||
|
|
Loading…
Reference in New Issue