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

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