From 8c05f3554fe80bd6fbf1aca47ad4fabaaeeb30b8 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Fri, 22 Jun 2012 14:09:52 +1200 Subject: [PATCH] BUGFIX: Add batch handler status messages (fixes #7427) 7427 was mostly fixed by Ingos previous patch. But two batch actions, delete from draft site and delete from published site werent returning status messages. Abstracted out the status preperation code that the batch actions that were returning status messages were using, and used that to add status messages to the problem two --- code/batchactions/CMSBatchActions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/batchactions/CMSBatchActions.php b/code/batchactions/CMSBatchActions.php index cbc09a31..7d080b2b 100644 --- a/code/batchactions/CMSBatchActions.php +++ b/code/batchactions/CMSBatchActions.php @@ -78,7 +78,7 @@ class CMSBatchAction_Delete extends CMSBatchAction { } - return Convert::raw2json($status); + return $this->response(_t('CMSBatchActions.DELETED_DRAFT_PAGES', 'Deleted %d pages from draft site, %d failures'), $status); } function applicablePages($ids) { @@ -123,7 +123,7 @@ class CMSBatchAction_DeleteFromLive extends CMSBatchAction { } - return Convert::raw2json($status); + return $this->response(_t('CMSBatchActions.DELETED_PAGES', 'Deleted %d pages from published site, %d failures'), $status); } function applicablePages($ids) {