diff --git a/ecrire/inc/documenter.php b/ecrire/inc/documenter.php index 112d7f8832433d41d18e0e4f94675d6f63b6360a..fc1fdad9695f2255cb8e4bfe4c96072a6cb1c7cd 100644 --- a/ecrire/inc/documenter.php +++ b/ecrire/inc/documenter.php @@ -39,7 +39,8 @@ function inc_documenter_dist( $documents = array(); while ($document = spip_fetch_array($lies)) $documents[] = $document; - } else $documents = $doc; + } else + $documents = $doc; if (!$documents) return ''; @@ -52,6 +53,14 @@ function inc_documenter_dist( $tourner = charger_fonction('tourner', 'inc'); $legender = charger_fonction('legender', 'inc'); + // Pour les doublons d'article et en mode ajax, il faut faire propre() + if ($type=='article' + AND !isset($GLOBALS['doublons_documents_inclus']) + AND is_int($doc)) { + $r = spip_fetch_array(spip_query("SELECT chapo,texte FROM spip_articles WHERE id_article="._q($doc))); + propre(join(" ",$r)); + } + foreach ($documents as $document) { $id_document = $document['id_document'];