Skip to content

Commit

Permalink
Merge pull request #572 from UN-OCHA/develop
Browse files Browse the repository at this point in the history
v1.14.0
  • Loading branch information
orakili authored Feb 16, 2023
2 parents f7f67fd + ce8bf83 commit a6094d3
Show file tree
Hide file tree
Showing 31 changed files with 899 additions and 364 deletions.
103 changes: 52 additions & 51 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ WORKDIR /srv/www

# Clean up previous composer installation and run new one.
RUN rm -rf ./vendor && \
# Update composer to avoid issues with missing drupal files.
# @see https://github.com/drupal-composer/drupal-project/issues/282
composer selfupdate && \
composer install --no-interaction

# Copy settings to default site location.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ function reliefweb_entities_cron() {
$embargoed_ids = $storage
->getQuery()
->condition('type', 'report', '=')
->condition('moderation_status', 'embargoed', '=')
->condition('field_embargo_date.value', gmdate("Y-m-d\TH:i:s"), '<')
->range(0, $cron_settings['embargoed_reports_limit'] ?? 20)
->execute();
Expand All @@ -694,6 +695,7 @@ function reliefweb_entities_cron() {
$report->field_embargo_date->setValue([]);
$report->setNewRevision(TRUE);
$report->setRevisionUserId(2);
$report->setRevisionCreationTime(time());
$report->setRevisionLogMessage(strtr('Embargoed document automatically published on @date.', [
'@date' => DateHelper::format($timestamp, 'custom', 'd M Y H:i e'),
]));
Expand Down Expand Up @@ -728,6 +730,7 @@ function reliefweb_entities_cron() {
$node->setModerationStatus('expired');
$node->setNewRevision(TRUE);
$node->setRevisionUserId(2);
$node->setRevisionCreationTime(time());
$node->setRevisionLogMessage(strtr('@type automatically expired on @date.', [
'@type' => ucfirst($node->bundle()),
'@date' => DateHelper::format($time, 'custom', 'd M Y H:i e'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public function getEntityMetaFromField($field, $code = NULL, array $extra_fields
if ($code !== NULL) {
$url = RiverServiceBase::getRiverUrl($this->bundle(), [
'advanced-search' => '(' . $code . $entity->id() . ')',
]);
], $entity->label(), TRUE);
}
else {
$url = $entity->toUrl();
Expand Down
Loading

0 comments on commit a6094d3

Please sign in to comment.