Code Duplication    Length = 8-10 lines in 2 locations

prive/formulaires/editer_auteur.php 1 location

@@ 463-470 (lines=8) @@
460
			$contexte = array_merge($contexte, $c);
461
			// si pas de langue explicitement demandee, prendre celle de l'auteur si on la connait, ou a defaut celle du site
462
			// plutot que celle de l'admin qui vient de cliquer sur le bouton
463
			if (!isset($contexte['lang']) or !$contexte['lang']) {
464
				if (isset($row['lang']) and $row['lang']) {
465
					$contexte['lang'] = $row['lang'];
466
				}
467
				else {
468
					$contexte['lang'] = $GLOBALS['meta']['langue_site'];
469
				}
470
			}
471
			lang_select($contexte['lang']);
472
			$message = recuperer_fond($fond, $contexte);
473
			include_spip("inc/notifications");

ecrire/inc/utils.php 1 location

@@ 3271-3280 (lines=10) @@
3268
	$texte = "";
3269
	$pages = array();
3270
	$lang_select = '';
3271
	if (!isset($options['etoile']) or !$options['etoile']) {
3272
		// Si on a inclus sans fixer le critere de lang, on prend la langue courante
3273
		if (!isset($contexte['lang'])) {
3274
			$contexte['lang'] = $GLOBALS['spip_lang'];
3275
		}
3276
3277
		if ($contexte['lang'] != $GLOBALS['meta']['langue_site']) {
3278
			$lang_select = lang_select($contexte['lang']);
3279
		}
3280
	}
3281
3282
	if (!isset($GLOBALS['_INC_PUBLIC'])) {
3283
		$GLOBALS['_INC_PUBLIC'] = 0;