Code Duplication    Length = 2-4 lines in 2 locations

Sources/ManageLanguages.php 1 location

@@ 928-931 (lines=4) @@
925
		);
926
927
		// Fifth, update getLanguages() cache.
928
		if (!empty($modSettings['cache_enable']))
929
		{
930
			cache_put_data('known_languages', null, !empty($modSettings['cache_enable']) && $modSettings['cache_enable'] < 1 ? 86400 : 3600);
931
		}
932
933
		// Sixth, if we deleted the default language, set us back to english?
934
		if ($context['lang_id'] == $language)

Sources/Load.php 1 location

@@ 2947-2948 (lines=2) @@
2944
			updateSettings(array('langList' => $smcFunc['json_encode']($catchLang)));
2945
2946
		// Let's cash in on this deal.
2947
		if (!empty($modSettings['cache_enable']))
2948
			cache_put_data('known_languages', $context['languages'], !empty($modSettings['cache_enable']) && $modSettings['cache_enable'] < 1 ? 86400 : 3600);
2949
	}
2950
2951
	return $context['languages'];