Code Duplication    Length = 5-9 lines in 2 locations

ecrire/inc/lang.php 1 location

@@ 144-148 (lines=5) @@
141
142
// http://code.spip.net/@lang_typo
143
function lang_typo($lang = '') {
144
	if (!$lang) {
145
		$lang = isset($GLOBALS['lang_objet'])
146
			? $GLOBALS['lang_objet']
147
			: $GLOBALS['spip_lang'];
148
	}
149
	if ($lang == 'eo'
150
		or $lang == 'fr'
151
		or strncmp($lang, 'fr_', 3) == 0

ecrire/inc/utils.php 1 location

@@ 772-780 (lines=9) @@
769
770
	// On peut passer explicitement la langue dans le tableau
771
	// On utilise le même nom de variable que la globale
772
	if (isset($args['spip_lang'])) {
773
		$lang = $args['spip_lang'];
774
		// On l'enleve pour ne pas le passer au remplacement
775
		unset($args['spip_lang']);
776
	} // Sinon on prend la langue du contexte
777
	else {
778
		$lang = $GLOBALS['spip_lang'];
779
	}
780
	$text = $traduire($texte, $lang);
781
782
	if (!strlen($text)) {
783
		if (!$o['force']) {