Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"discoverygarden/update-helper": "^1",
"discoverygarden/dgi_standard_derivative_examiner": "^1.2 || ^2"
},
"conflict": {
"drush/drush": "<13"
},
"extra": {
"drush": {
"services": {
Expand Down
2 changes: 1 addition & 1 deletion islandora_drush_utils.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: 'Islandora Drush Utils'
description: "Drush utility functions for Islandora."
type: module
package: DGI
core_version_requirement: ^9 || ^10
core_version_requirement: ^10 || ^11
dependencies:
- islandora:islandora
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command never seems to have been used? The missing $context should've made rather a mess, and the missing accessCheck() invocations seem to suggest that this was never called in D10?

Could just drop this command/file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it was written back in 2023 and was a one time use command that the team deemed as potentially useful for the future. I'm indifferent on leaving it in

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PublishUnpublishCollectionsDrushCommands extends DrushCommands {
public function __construct(EntityTypeManagerInterface $entity_type_manager, IslandoraUtils $islandora_utils, LoggerInterface $logger) {
$this->storage = $entity_type_manager;
$this->utils = $islandora_utils;
$this->logger = $logger;
$this->logger()?->add('islandora_drush_utils', $logger);
}

/**
Expand Down Expand Up @@ -97,9 +97,12 @@ public function updateStatus(
* The publish status of the nodes and media.
* @param array $ancestor_nids
* The array of NIDs to search for as an ancestor.
* @param array $context
* The batch context.
*/
public function updateStatusBatch(int $batch_size, bool $publish, array $ancestor_nids) {
public function updateStatusBatch(int $batch_size, bool $publish, array $ancestor_nids, array &$context) {
$query = $this->storage->getStorage('node')->getQuery()
->accessCheck(FALSE)
->condition('type', 'islandora_object')
->exists('field_member_of');

Expand Down Expand Up @@ -151,6 +154,7 @@ public function updateStatusBatch(int $batch_size, bool $publish, array $ancesto

$mids = $this->storage->getStorage('media')
->getQuery()
->accessCheck(FALSE)
->exists('field_media_of')
->condition('field_media_of', $node->id())
->execute();
Expand Down
2 changes: 1 addition & 1 deletion src/Drush/Commands/Sec873DrushCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct(
protected QueueFactory $queueFactory,
) {
parent::__construct();
$this->setLogger($logger);
$this->logger()?->add('islandora_drush_utils.sec_873', $logger);
}

/**
Expand Down