Commit f76b38cd authored by Kevin Duret's avatar Kevin Duret Committed by Kevin Duret

fix(wiki): avoid double migration of service wiki pages (#5883)

parent 326df22a
......@@ -44,16 +44,16 @@ foreach ($pages as $page) {
$newName = '';
if (preg_match('/Host\:(.+)/', $page, $matches)) {
$newName = 'Host : ' . $matches[1];
} elseif (preg_match('/Host-Template\:(.+)/', $page, $matches)){
} elseif (preg_match('/Host-Template\:(.+)/', $page, $matches)) {
$newName = 'Host-Template : ' . $matches[1];
} elseif (preg_match('/Service\:(.+)/', $page, $matches)){
} elseif (preg_match('/Service\:(.+)/', $page, $matches) && !preg_match('/Service\:\s+\/\s+/', $page)) {
$name = explode(' ', $matches[1]);
if (count($name) > 1) {
$hostName = array_shift($name);
$serviceName = implode(' ', $name);
$newName = 'Service : ' . $hostName . ' / ' . $serviceName;
}
} elseif (preg_match('/Service-Template\:(.+)/', $page, $matches)){
} elseif (preg_match('/Service-Template\:(.+)/', $page, $matches)) {
$newName = 'Service-Template : ' . $matches[1];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment