From f7bccabfd2c584cd9ceb0bac8d185224c1ccca18 Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Sat, 10 Feb 2007 17:42:49 +0000 Subject: [PATCH] les documents inclus dans le portfolio n'etaient pas grises, apres l'upload en ajax --- ecrire/inc/documenter.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ecrire/inc/documenter.php b/ecrire/inc/documenter.php index 112d7f8832..fc1fdad969 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']; -- GitLab