Skip to content

Commit

Permalink
1597413812: Proposed release for 7.x-1.18.10 (#109)
Browse files Browse the repository at this point in the history
* Update to Drupal 7.61. For more information, see https://www.drupal.org/project/drupal/releases/7.61

* Update to PHP 7.2. For details see https://pantheon.io/blog/php-72-everywhere/

* Update to Drupal 7.62. For more information, see https://www.drupal.org/project/drupal/releases/7.62

* Update to Drupal 7.63. For more information, see https://www.drupal.org/project/drupal/releases/7.63

* Update to Drupal 7.64. For more information, see https://www.drupal.org/project/drupal/releases/7.64

* Update to Drupal 7.65. For more information, see https://www.drupal.org/project/drupal/releases/7.65

* Update to Drupal 7.66. For more information, see https://www.drupal.org/project/drupal/releases/7.66

* Update to Drupal 7.67. For more information, see https://www.drupal.org/project/drupal/releases/7.67

* BUGS-2253: Remove 'Icon' from .gitignore.

* Enforce HTTPS. For more info see https://pantheon.io/blog/pantheon-now-enforces-https-default-plus-really-simple-hsts

* Update to Drupal 7.68. For more information, see https://www.drupal.org/project/drupal/releases/7.68

* Update to Drupal 7.69. For more information, see https://www.drupal.org/project/drupal/releases/7.69

* Update to Drupal 7.70. For more information, see https://www.drupal.org/project/drupal/releases/7.70

* Update to Drupal 7.71. For more information, see https://www.drupal.org/project/drupal/releases/7.71

* [OTTO-355] Default to Drush 8 in pantheon.upstream.yml

* [OTTO-357] Add protected_web_paths to upstream

* Update to Drupal 7.72. For more information, see https://www.drupal.org/project/drupal/releases/7.72

* 7.x-1.18.10 release

Co-authored-by: Pantheon Automation <[email protected]>
Co-authored-by: Greg Anderson <[email protected]>
Co-authored-by: Greg Anderson <[email protected]>
Co-authored-by: Greg Anderson <[email protected]>
Co-authored-by: Jenkins <[email protected]>
  • Loading branch information
6 people authored Aug 14, 2020
1 parent be9f243 commit db5840a
Show file tree
Hide file tree
Showing 47 changed files with 129 additions and 58 deletions.
4 changes: 4 additions & 0 deletions profiles/dkan/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
7.x-1.18.10
-----------
- #3179 Added drush command for forcing updates on dkan_periodic_updates.

7.x-1.18.9
----------
- #3135 Added missing translation.
Expand Down
2 changes: 1 addition & 1 deletion profiles/dkan/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DKAN Open Data Platform (7.x-1.18.9)
# DKAN Open Data Platform (7.x-1.18.10)

DKAN is an open source open data platform with a full suite of cataloging, publishing and visualization features that allow organizations to easily publish data to the public.

Expand Down
2 changes: 1 addition & 1 deletion profiles/dkan/dkan.info
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ dependencies[] = dkan_datastore_simple_import
dependencies[] = dkan_datastore_api
dependencies[] = open_data_schema_map_dkan
dependencies[] = visualization_entity_charts_dkan
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ features[variable][] = panelizer_node:data_dashboard_default
features[views_view][] = data_dashboards
features[views_view][] = front_page_dashboards_list
features_exclude[dependencies][dkan_topics] = dkan_topics
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ features_exclude[dependencies][image] = image
features_exclude[dependencies][strongarm] = strongarm
features_exclude[dependencies][taxonomy] = taxonomy
no autodetect = 1
version = 7.x-1.18.9
version = 7.x-1.18.10
2 changes: 1 addition & 1 deletion profiles/dkan/modules/dkan/dkan_dataset/dkan_dataset.info
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ features[ctools][] = views:views_default:3.0
features[features_api][] = api:2
features[variable][] = pathauto_node_dataset_pattern
features[variable][] = pathauto_node_resource_pattern
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ features_exclude[dependencies][og] = og
features_exclude[dependencies][dkan_featured_topics] = dkan_featured_topics
features_exclude[field_base][og_group_ref] = og_group_ref
features_exclude[field_instance][node-dataset-og_group_ref] = node-dataset-og_group_ref
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ features[views_view][] = front_page_group_grid
features[views_view][] = front_page_group_list
features[views_view][] = group_block
features[views_view][] = groups_page
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ features[og_features_permission][] = node:group:update own dataset content
features[og_features_permission][] = node:group:update own resource content
features[og_features_permission][] = node:group:view any unpublished dataset content
features[og_features_permission][] = node:group:view any unpublished resource content
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ dependencies[] = services
features[ctools][] = services:services:3
features[features_api][] = api:2
features[services_endpoint][] = dkan_dataset_api
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ features[field_instance][] = comment-comment_node_dataset-field_rating
features[field_instance][] = node-dataset-field_rating
features[variable][] = ajax_comments_node_types
features[variable][] = ajax_comments_notify
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ core = 7.x
dependencies[] = dkan_dataset
dependencies[] = dkan_dataset_rest_api
hidden = TRUE
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ features[features_api][] = api:2
features[field_base][] = field_datastore_status
features[field_instance][] = node-resource-field_datastore_status
features[views_view][] = datasets
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ package = DKAN API
core = 7.x
dependencies[] = services
dependencies[] = dkan_datastore
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description = Enable fast import for resources
core = 7.x
package = DKAN
dependencies[] = dkan_datastore
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description = A datastore importer that uses MySQL insert statements, and a cust
core = 7.x
package = DKAN
dependencies[] = dkan_datastore
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description = Basic environments management (Local, Development, Production, etc
core = 7.x
dependencies[] = environment
dependencies[] = environment_indicator
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ files[] = includes/page.inc
files[] = includes/panelized_node.inc
files[] = includes/resource.inc
files[] = includes/visualization_entity.inc
version = 7.x-1.18.9
version = 7.x-1.18.10
2 changes: 1 addition & 1 deletion profiles/dkan/modules/dkan/dkan_harvest/dkan_harvest.info
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ files[] = includes/HarvestCache.php
files[] = includes/HarvestMigrateSQLMap.php
files[] = includes/HarvestMigrateSourceList.php
files[] = includes/XmlHarvestMigration.php
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ features[views_view][] = dkan_harvest_datasets
files[] = views/handlers/views_handler_field_date_harvest_date.inc
files[] = views/handlers/views_handler_field_numeric_harvest_count.inc
files[] = views/handlers/views_handler_field_harvest_status.inc
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ core = 7.x

dependencies[] = dkan_harvest
files[] = dkan_harvest_datajson.migrate.inc
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description = Test module for dkan_harvest
core = 7.x

dependencies[] = 'dkan_harvest'
version = 7.x-1.18.9
version = 7.x-1.18.10
2 changes: 1 addition & 1 deletion profiles/dkan/modules/dkan/dkan_ipe/dkan_ipe.info
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ dependencies[] = panels
dependencies[] = strongarm
features[features_api][] = api:2
project path = profiles/dkan/modules/dkan
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ features[variable][] = linkchecker_scan_node_resource
features[views_view][] = dkan_linkchecker_reports
features_exclude[dependencies][ctools] = ctools
project path = profiles/dkan/modules/dkan
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ files[] = dkan_migrate_base_group.inc
files[] = dkan_migrate_base_dataset.inc
files[] = dkan_migrate_base_resource.inc
files[] = dkan_migrate_base_data_json.inc
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ package = "DKAN"
core = 7.x
dependencies[] = dkan_migrate_base
dependencies[] = open_data_federal_extras
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

/**
* @file
* Code for dkan_periodic_updates drush commands.
*/

/**
* Implements hook_drush_command().
*/
function dkan_periodic_updates_drush_command() {
$commands['dkan-force-resources-update'] = array(
'description' => 'Force resources from manifest to be updated.',
'aliases' => array('dfru'),
);

return $commands;
}

/**
* Drush command logic.
*/
function drush_dkan_periodic_updates_dkan_force_resources_update() {
$active = variable_get('dkan_periodic_updates_status');
if ($active) {
$items = [];
$file = variable_get('dkan_periodic_updates_manifest');
$file = file_load($file);
// Get items from manifest.
if ($file) {
$handle = fopen($file->uri, 'r');
$headers = fgetcsv($handle, 0, ',');

while (($data = fgetcsv($handle, 0, ",")) !== FALSE) {
$resource_data = array_combine($headers, $data);
$items[$resource_data['resource_id']]['file_url'] = $resource_data['file_url'];
$datastore = $resource_data['import_to_datastore'] === 'Y' ? TRUE : FALSE;
$items[$resource_data['resource_id']]['datastore'] = $datastore;
}
fclose($handle);
}
else {
watchdog('dkan_periodic_updates', 'No manifest found.');
return [];
}

if (!empty($items)) {
dkan_periodic_updates_execute_update($items);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ core = 7.x
package = DKAN
dependencies[] = dkan_dataset
dependencies[] = dkan_datastore
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
/**
* Implements hook_permission().
*/
function dkan_periodic_updates_permission()
{
function dkan_periodic_updates_permission() {
return [
'administer periodic updates' => [
'title' => t('administer periodic updates')
'title' => t('administer periodic updates'),
],
];
}
Expand Down Expand Up @@ -42,7 +41,6 @@ function dkan_periodic_updates_menu() {
return $items;
}


/**
* Page callback for admin/dkan/periodic-updates.
*/
Expand Down Expand Up @@ -196,6 +194,9 @@ function dkan_periodic_updates_cron() {
}
}

/**
* Get items that need to be updated.
*/
function dkan_periodic_updates_get_items_to_update($file) {
$file = file_load($file);
if ($file) {
Expand All @@ -217,11 +218,13 @@ function dkan_periodic_updates_get_items_to_update($file) {
$to_update[$resource_data['resource_id']]['file_url'] = $resource_data['file_url'];
}
break;

case 'weekly':
if ($time_passed->days >= 7) {
$to_update[$resource_data['resource_id']]['file_url'] = $resource_data['file_url'];
}
break;

default:
if ($time_passed->days >= 1) {
$to_update[$resource_data['resource_id']]['file_url'] = $resource_data['file_url'];
Expand All @@ -243,7 +246,8 @@ function dkan_periodic_updates_get_items_to_update($file) {
}
fclose($handle);
return $to_update;
} else {
}
else {
watchdog('dkan_periodic_updates', 'No manifest found.');
return [];
}
Expand All @@ -262,7 +266,8 @@ function dkan_periodic_updates_execute_update($resources) {
if (empty($nids)) {
watchdog('dkan_periodic_updates', 'There is no node with UUID !uuid.', ['!uuid' => $uuid], WATCHDOG_WARNING);
variable_set('dkan_periodic_updates_message_' . $uuid, 'No node found for the UUID specified.');
} else {
}
else {
foreach ($nids as $nid) {
$node = node_load($nid);
$updated = FALSE;
Expand Down Expand Up @@ -302,7 +307,8 @@ function dkan_periodic_updates_execute_update($resources) {
try {
_dkan_datastore_resource_drop($node->nid);
$import = _dkan_datastore_resource_import($node->nid);
} catch (\Exception $e) {
}
catch (\Exception $e) {
$message = 'Error importing to the datastore: ' . htmlspecialchars($e->getMessage());
watchdog('error', $message, [], WATCHDOG_ERROR);
variable_set('dkan_periodic_updates_message_' . $uuid, $message);
Expand All @@ -312,7 +318,8 @@ function dkan_periodic_updates_execute_update($resources) {
variable_del('dkan_periodic_updates_message_' . $uuid);
}
}
} else {
}
else {
watchdog('dkan_periodic_updates', 'Node with nid !nid not found.', ['!nid' => $nid], WATCHDOG_WARNING);
variable_set('dkan_periodic_updates_message_' . $uuid, 'Node with nid ' . $nid . ' was not found.');
}
Expand All @@ -329,15 +336,22 @@ function dkan_periodic_updates_state() {
$active = variable_get('dkan_periodic_updates_status');
$output = [];
$output['info'] = [
'#markup' => '<p>' . t('The updates are evaluated on every cron run. If a resource from your manifest hasn\'t been updated yet, it may be updated on the next cron run.') . '</p>',
'#markup' => '<p>' . t("The updates are evaluated on every cron run. If a resource from your manifest hasn't been updated yet, it may be updated on the next cron run.") . "</p>",
];
if ($active) {
$file = variable_get('dkan_periodic_updates_manifest');
$file = file_load($file);
if ($file) {
$handle = fopen($file->uri, 'r');
$headers = fgetcsv($handle, 0, ',');
$table_headers = [t('Destination Resource ID'), t('Source File URL'), t('Update frequency'), t('Status'), t('Last update'), t('Import to datastore')];
$table_headers = [
t('Destination Resource ID'),
t('Source File URL'),
t('Update frequency'),
t('Status'),
t('Last update'),
t('Import to datastore'),
];

while (($data = fgetcsv($handle, 0, ",")) !== FALSE) {
$resource_data = array_combine($headers, $data);
Expand All @@ -346,7 +360,7 @@ function dkan_periodic_updates_state() {
if (empty($last_updated)) {
$last_updated = ' - ';
if (empty($status)) {
$status = t('Resource hasn\'t been updated.');
$status = t("Resource hasn't been updated.");
}
}
else {
Expand All @@ -366,6 +380,7 @@ function dkan_periodic_updates_state() {
case 'weekly':
$frequency = $resource_data['frequency'];
break;

default:
$frequency = 'daily';
}
Expand All @@ -377,7 +392,8 @@ function dkan_periodic_updates_state() {
'#header' => $table_headers,
'#rows' => $table_rows,
];
} else {
}
else {
$output['state'] = [
'#markup' => '<p class="alert alert-warning">' . t('No manifest was found.') . '</p>',
];
Expand All @@ -394,7 +410,7 @@ function dkan_periodic_updates_state() {

/**
* Helper function to get file contents.
*/
*/
function dkan_periodic_updates_curl_get_contents($url, $path) {
$url = preg_replace('/ /', '%20', $url);
$fp = fopen($path, 'w');
Expand Down Expand Up @@ -447,7 +463,7 @@ function dkan_periodic_updates_create_file($file_url, $download = FALSE, $nid =
$files = file_load_multiple(array(), array('uri' => $file_url));
$file = reset($files);
if (!$file) {
$file = file_save((object)[
$file = file_save((object) [
'filename' => drupal_basename($file_url),
'uri' => $file_url,
'status' => FILE_STATUS_PERMANENT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ features[roles_permissions][] = editor
features[roles_permissions][] = site manager
features_exclude[dependencies][features] = features
project path = profiles/dkan/modules/dkan
version = 7.x-1.18.9
version = 7.x-1.18.10
2 changes: 1 addition & 1 deletion profiles/dkan/modules/dkan/dkan_plugins/dkan_plugins.info
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ dependencies[] = ctools
dependencies[] = panels
project path = profiles/dkan/modules/dkan
scripts[] = js/colorPicker.behavior.js
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ features[views_view][] = dkan_administration_files
features[views_view][] = dkan_administration_nodes
features[views_view][] = dkan_administration_users
features[views_view][] = popular_tags
version = 7.x-1.18.9
version = 7.x-1.18.10
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ features[context][] = sitewide
features[ctools][] = context:context:3
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
version = 7.x-1.18.9
version = 7.x-1.18.10
Loading

0 comments on commit db5840a

Please sign in to comment.