Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

[91] - switching the patterns in the MediaInternetGovCmsCkanHandler->… #93

Merged
Merged
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class MediaInternetGovCmsCkanHandler extends MediaInternetBaseHandler {
// @baseurl/dataset/PACKAGE_ID/resource/RESOURCE_ID/download/filename.csv
// @baseurl/dataset/PACKAGE_ID/resource/RESOURCE_ID
$patterns = array(
'@' . $this->baseHost . '/dataset/([^"\&\? ]+)/resource/([^"\&\? ]+)/download/(?:[^"\&\? ]+)@i',
'@' . $this->baseHost . '/dataset/([^"\&\? ]+)/resource/([^"\&\? ]+)@i',
'@' . $this->baseUrl . '/dataset/([^"\&\? ]+)/resource/([^"\&\? ]+)/download/(?:[^"\&\? ]+)@i',
'@' . $this->baseUrl . '/dataset/([^"\&\? ]+)/resource/([^"\&\? ]+)@i',
Copy link
Contributor

Choose a reason for hiding this comment

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

That one was changed to support ckan endpoints using different ports, could we instead change where baseUrl is set to also include the path if it exists?

Eg. https://github.com/govCMS/govcms-ckan/blob/7.x-1.x/modules/govcms_ckan_media/includes/MediaInternetGovCmsCkanHandler.inc#L182

);

// First check if the url contains the embed code.
Expand Down