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

@@ 2967-2968 (lines=2) @@
2964
			updateSettings(array('langList' => $smcFunc['json_encode']($catchLang)));
2965
2966
		// Let's cash in on this deal.
2967
		if (!empty($modSettings['cache_enable']))
2968
			cache_put_data('known_languages', $context['languages'], !empty($modSettings['cache_enable']) && $modSettings['cache_enable'] < 1 ? 86400 : 3600);
2969
	}
2970
2971
	return $context['languages'];