From 95e6516e616b30222a11e171dede879a9463f93c Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Fri, 17 Dec 2010 01:01:12 +0000 Subject: [PATCH] BUGFIX: disable translatable filter on batch actions. Fixes #4442 (thanks to helgert) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@115156 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSBatchActionHandler.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/CMSBatchActionHandler.php b/code/CMSBatchActionHandler.php index 2fdc4e83..6ad63c54 100644 --- a/code/CMSBatchActionHandler.php +++ b/code/CMSBatchActionHandler.php @@ -1,4 +1,5 @@ $v) if(!is_numeric($v)) unset($ids[$k]); if($ids) { + if(Object::has_extension('SiteTree','Translatable')) Translatable::disable_locale_filter(); + $pages = DataObject::get( $this->recordClass, sprintf( @@ -89,6 +93,8 @@ class CMSBatchActionHandler extends RequestHandler { ) ); + if(Object::has_extension('SiteTree','Translatable')) Translatable::enable_locale_filter(); + if(Object::has_extension($this->recordClass, 'Versioned')) { // If we didn't query all the pages, then find the rest on the live site if(!$pages || $pages->Count() < sizeof($ids)) {