mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 13:41:52 +02:00
fixes #3059 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:
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'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user