Skip to content
Snippets Groups Projects
Commit dce8ef82 authored by catch's avatar catch
Browse files

Issue #1272840: reverting more stuff.

parent 67a5bf1a
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -206,38 +206,6 @@ function locale_schema() {
return $schema;
}
/**
* Converts language domains to new format.
*/
function locale_update_8001() {
$message = '';
$domains = locale_language_negotiation_url_domains();
// $used_domains keeps track of the domain names in use.
$used_domains = array();
foreach ($domains as $langcode => $domain) {
// Domain names can not contain protocol and/or ports.
if (!empty($domain)) {
$host = 'http://' . str_replace(array('http://', 'https://'), '', $domain);
if (parse_url($host, PHP_URL_HOST) != $domain) {
$domains[$langcode] = parse_url($host, PHP_URL_HOST);
}
if (array_key_exists($domain, $used_domains)) {
if (empty($message)) {
$message = 'Some languages are using the same domain name, you should change these domain names at ' . l('URL language detection configuration', 'admin/config/regional/language/configure/url' . '.');
}
}
else {
$used_domains[$domain] = $domain;
}
}
}
locale_language_negotiation_url_domains_save($domains);
if (!empty($message)) {
return $message;
}
}
/**
* @addtogroup updates-7.x-to-8.x
* @{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment