1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 13:41:52 +02:00

fixes Language list was empty, even if languages were available

download and info link returned from languagepacks.xml contain wrong links
This commit is contained in:
Achim Ennenbach 2018-07-04 12:09:25 +02:00
parent 89e3716c3f
commit 047b7f8f7d

@ -913,12 +913,23 @@ class lancheck
return false;
}
foreach($rawData['language'] as $val)
foreach($rawData['language'] as $key => $att)
{
$att = $val['@attributes'];
// issue #3059 Language list didn't load
if ($key != '@attributes') continue;
$id = $att['name'];
// fix github double url bug...
if (stripos($att['url'], 'https://github.comhttps://github.com') !== false)
{
$att['url'] = str_ireplace('https://github.comhttps://github.com', 'https://github.com', $att['url']);
}
if (stripos($att['infourl'], 'https://github.comhttps://github.com') !== false)
{
$att['infourl'] = str_ireplace('https://github.comhttps://github.com', 'https://github.com', $att['infourl']);
}
$languages[$id] = array(
'name' => $att['name'],
'author' => $att['author'],