Code Duplication    Length = 8-9 lines in 3 locations

ecrire/action/editer_breve.php 1 location

@@ 111-119 (lines=9) @@
108
function revisions_breves ($id_breve, $c=false) {
109
110
	// champs normaux
111
	if ($c === false) {
112
		$c = array();
113
		foreach (array(
114
			'titre', 'texte', 'lien_titre', 'lien_url',
115
			'id_parent', 'statut'
116
		) as $champ)
117
			if (($a = _request($champ)) !== null)
118
				$c[$champ] = $a;
119
	}
120
121
	// Si la breve est publiee, invalider les caches et demander sa reindexation
122
	$t = sql_getfetsel("statut", "spip_breves", "id_breve=$id_breve");

ecrire/action/editer_rubrique.php 1 location

@@ 88-96 (lines=9) @@
85
	include_spip('inc/filtres');
86
87
	// champs normaux
88
	if ($c === false) {
89
		$c = array();
90
		foreach (array(
91
			'titre', 'texte', 'descriptif', 'extra',
92
			'id_parent', 'confirme_deplace'
93
		) as $champ)
94
			if (($a = _request($champ)) !== null)
95
				$c[$champ] = $a;
96
	}
97
98
	include_spip('inc/modifier');
99
	modifier_contenu('rubrique', $id_rubrique,

ecrire/action/editer_site.php 1 location

@@ 178-185 (lines=8) @@
175
	include_spip('inc/autoriser');
176
177
	// champs normaux
178
	if ($c === false) {
179
		$c = array();
180
		foreach (array(
181
			'nom_site', 'url_site', 'descriptif', 'url_syndic', 'syndication', 'statut', 'id_parent'
182
		) as $champ)
183
			if (($a = _request($champ)) !== null)
184
				$c[$champ] = $a;
185
	}
186
187
	// Si le site est publie, invalider les caches et demander sa reindexation
188
	$t = sql_getfetsel("statut", "spip_syndic", "id_syndic=$id_syndic");