From 4f4d1870ca7719f78ee6e8f7c6ec843a5a128efa Mon Sep 17 00:00:00 2001 From: daniquilez Date: Fri, 9 May 2014 18:09:29 +0200 Subject: [PATCH] improvement on addBulkAction function. It takes into consideration the $config values passed as function parameters. --- code/GridFieldBulkManager.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/GridFieldBulkManager.php b/code/GridFieldBulkManager.php index 983cd00..169f532 100644 --- a/code/GridFieldBulkManager.php +++ b/code/GridFieldBulkManager.php @@ -211,9 +211,9 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr } else{ $config = array( - 'isAjax' => true, - 'icon' => 'accept', - 'isDestructive' => false + 'isAjax' => isset($config['isAjax']) ? $config['isAjax'] : true, + 'icon' => isset($config['icon']) ? $config['icon'] : 'accept', + 'isDestructive' => isset($config['isDestructive']) ? $config['isDestructive'] : false ); } @@ -379,4 +379,4 @@ class GridFieldBulkManager implements GridField_HTMLProvider, GridField_ColumnPr user_error("Unable to find matching bulk action handler for ".$request->remaining().'.', E_USER_ERROR); } -} \ No newline at end of file +}