The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 64ff22d2 authored by tom-dea's avatar tom-dea Committed by Demian Katz
Browse files

fixed translations of wiki redirect token.

- checked for languages en de es fr it pt ru cs sv da sl si
parent e5e265c5
No related merge requests found
......@@ -361,11 +361,16 @@ class Wikipedia implements TranslatorAwareInterface
$page = array_shift($page['revisions']);
// Check for redirection
$as_lines = explode("\n", $page['*']);
if (stristr($as_lines[0], '#REDIRECT')) {
preg_match('/\[\[(.*)\]\]/', $as_lines[0], $matches);
$redirectTo = $matches[1];
} else {
$redirectTo = false;
$redirectTo = false;
$redirectTokens = ['#REDIRECT', '#WEITERLEITUNG', '#OMDIRIGERING'];
foreach ($redirectTokens as $redirectToken) {
if (stristr($as_lines[0], $redirectToken)) {
preg_match('/\[\[(.*)\]\]/', $as_lines[0], $matches);
$redirectTo = $matches[1];
break;
}
}
if (!$redirectTo) {
break;
}
}
......
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