mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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
This commit is contained in:
parent
2d3bb7de3e
commit
95e6516e61
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Special request handler for admin/batchaction
|
||||
*
|
||||
@ -6,6 +7,7 @@
|
||||
* @subpackage batchaction
|
||||
*/
|
||||
class CMSBatchActionHandler extends RequestHandler {
|
||||
|
||||
static $batch_actions = array();
|
||||
|
||||
static $url_handlers = array(
|
||||
@ -80,6 +82,8 @@ class CMSBatchActionHandler extends RequestHandler {
|
||||
foreach($ids as $k => $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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user