Skip to content

Commit 86f132b

Browse files
authored
Merge pull request #44 from dof-dss/development
Unity modules release
2 parents 467da70 + 045cbc0 commit 86f132b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

unity_internal_link_checker/unity_internal_link_checker.module

+7-7
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,24 @@ function unity_internal_link_checker__convert_absolute_link(&$body_text, $origin
9191
function unity_internal_link_checker__urls_to_replace(): string {
9292
// Get the host name of the site and remove the domain extension.
9393
$host = \Drupal::request()->getHost();
94-
if (preg_match('/\S*?\.(uk|com|net|eu)/', $host, $matches)) {
94+
if (preg_match('/\S*?\.(gov.uk|org.uk|co.uk|com|net|eu|org)/', $host, $matches)) {
9595
$host = $matches[0];
9696
}
97-
else {
98-
if (preg_match('/\S*?\.(org)/', $host, $matches)) {
99-
$host = $matches[0];
100-
}
101-
}
10297
// Strip 'www' from hostname.
10398
$host = str_replace('www.', '', $host);
10499
// List all domain protocols and extensions for our platform and local environments.
105100
$protocols = ['http://', 'http://www.', 'https://', 'https://www.'];
106101
$extensions = [
107102
'.lndo.site/',
103+
'/',
104+
// Unity 1 platform environments.
108105
'.d8un-edge-xerfxyi-6tlkpwbr6tndk.uk-1.platformsh.site/',
109106
'.d8un-uat-qhl74ni-6tlkpwbr6tndk.uk-1.platformsh.site/',
110107
'.main-bvxea6i-6tlkpwbr6tndk.uk-1.platformsh.site/',
111-
'/',
108+
// Unity 2 platform environments.
109+
'.development-q5nzhaa-kamkoebtv74zm.uk-1.platformsh.site/',
110+
'.edge-uhfrady-kamkoebtv74zm.uk-1.platformsh.site/',
111+
'.uat-nvcvooy-kamkoebtv74zm.uk-1.platformsh.site/',
112112
];
113113
$urls_to_replace = '';
114114
// Loop through and add all protocols and extensions to the current site.

0 commit comments

Comments
 (0)