Skip to content

Commit

Permalink
Fixed use without fix of omeka/omeka-s#1260.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-KM committed Apr 21, 2019
1 parent f4a363e commit ddfb75f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Admin/EbookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ public function createAction()
: [];
$params['resource_ids'] = $resourceIds;
// Manage Omeka with or without pull request #1260 (with or without
// param batch_action), so check $resourceIds.
$selectAll = $params['batch_action'] ? $params['batch_action'] === 'ebook-all' : empty($resourceIds);
// param batch_action), so check $resourceIds in all cases.
$selectAll = $params['batch_action'] ? $params['batch_action'] === 'ebook-all' : (empty($resourceIds) || (bool) $params['ebook_all']);
$params['batch_action'] = $selectAll ? 'ebook-all' : 'ebook-selected';

$controllers = [
Expand Down

0 comments on commit ddfb75f

Please sign in to comment.