Skip to content
Snippets Groups Projects
Commit 36318a53 authored by Tim Steiner's avatar Tim Steiner
Browse files

[gh-504] Instead of making everything lowercase, do case-insensive searches for existing paths.

parent 9f29350c
No related branches found
No related tags found
No related merge requests found
...@@ -306,8 +306,10 @@ class Unl_Migration_Tool ...@@ -306,8 +306,10 @@ class Unl_Migration_Tool
if (($fragmentStart = strrpos($path, '#')) !== FALSE) { if (($fragmentStart = strrpos($path, '#')) !== FALSE) {
$path = substr($path, 0, $fragmentStart); $path = substr($path, 0, $fragmentStart);
} }
$path = strtolower($path);
$path = trim($path, '/'); $path = trim($path, '/');
if (array_search(strtolower($path), array_map('strtolower', $this->_siteMap)) !== FALSE) {
return;
}
$this->_siteMap[hash('SHA256', $path)] = $path; $this->_siteMap[hash('SHA256', $path)] = $path;
} }
...@@ -416,7 +418,6 @@ class Unl_Migration_Tool ...@@ -416,7 +418,6 @@ class Unl_Migration_Tool
if (!$path) { if (!$path) {
$path = ''; $path = '';
} }
$path = strtolower($path);
$path = trim($path, '/'); $path = trim($path, '/');
if ($fragmentPos = strrpos($path, '#') !== FALSE) { if ($fragmentPos = strrpos($path, '#') !== FALSE) {
...@@ -426,7 +427,7 @@ class Unl_Migration_Tool ...@@ -426,7 +427,7 @@ class Unl_Migration_Tool
if (substr($path, -1) == '/') { if (substr($path, -1) == '/') {
$path = substr($path, 0, -1); $path = substr($path, 0, -1);
} }
$nodeId = array_search($path, $this->_nodeMap, TRUE); $nodeId = array_search(strtolower($path), array_map('strtolower', $this->_nodeMap), TRUE);
if ($nodeId) { if ($nodeId) {
$item['link_path'] = 'node/' . $nodeId; $item['link_path'] = 'node/' . $nodeId;
} }
...@@ -463,7 +464,6 @@ class Unl_Migration_Tool ...@@ -463,7 +464,6 @@ class Unl_Migration_Tool
if (!$path) { if (!$path) {
$path = ''; $path = '';
} }
$path = strtolower($path);
$path = trim($path, '/'); $path = trim($path, '/');
if (($fragmentPos = strrpos($path, '#')) !== FALSE) { if (($fragmentPos = strrpos($path, '#')) !== FALSE) {
...@@ -473,7 +473,7 @@ class Unl_Migration_Tool ...@@ -473,7 +473,7 @@ class Unl_Migration_Tool
if (substr($path, -1) == '/') { if (substr($path, -1) == '/') {
$path = substr($path, 0, -1); $path = substr($path, 0, -1);
} }
$nodeId = array_search($path, $this->_nodeMap, TRUE); $nodeId = array_search(strtolower($path), array_map('strtolower', $this->_nodeMap), TRUE);
if ($nodeId) { if ($nodeId) {
$item['link_path'] = 'node/' . $nodeId; $item['link_path'] = 'node/' . $nodeId;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment