Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
Showing only changes of commit 1cb880f785 - Show all commits

View File

@ -263,8 +263,15 @@ final class Kitsu {
if (array_key_exists('localized', $titles) && is_array($titles['localized'])) if (array_key_exists('localized', $titles) && is_array($titles['localized']))
{ {
foreach($titles['localized'] as $alternateTitle) foreach($titles['localized'] as $locale => $alternateTitle)
{ {
// Really don't care about languages that aren't english
// or Japanese for titles
if ( ! in_array($locale, ['en', 'en_us', 'en_jp', 'ja_jp']))
{
continue;
}
if (self::titleIsUnique($alternateTitle, $valid)) if (self::titleIsUnique($alternateTitle, $valid))
{ {
$valid[] = $alternateTitle; $valid[] = $alternateTitle;