1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Merge pull request #3253 from SimSync/fix_3059

fixes #3059 Language list was empty, even if languages were available
This commit is contained in:
Cameron
2018-07-04 17:46:16 -07:00
committed by GitHub

View File

@@ -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'],