<:eq_contenu:>
<:eq_historique_lien:> [ - (#TITRE|supprimer_numero)]
$id_version) {
$t = $id_version;
$id_version = $id_diff;
$id_diff = $t;
$old = $textes;
$new = $textes = recuperer_version($id_article, $id_version);
}
else {
$old = recuperer_version($id_article, $id_diff);
$new = $textes;
}
$textes = array();
foreach ($champs as $champ) {
if (!$new[$champ] && !$old[$champ]) continue;
$diff = new Diff(new DiffTexte);
$textes[$champ] = afficher_diff($diff->comparer(preparer_diff($new[$champ]), preparer_diff($old[$champ])));
}
}
if (is_array($textes))
foreach ($textes as $var => $t) $$var = $t;
// Affichage des versions
$cinoresult=true;
echo " ";
// Corps de la version affichee
if ($id_version) {
echo "\n\n
";
echo "
";
echo "- ";
$result = cisql_select("id_version, titre_version, date, v.id_auteur, a.nom", "spip_versions AS v, spip_auteurs AS a", "id_article=$id_article AND v.id_auteur=a.id_auteur","","id_version DESC");
while ($row = cisql_fetch($result)) {
$cinoresult=false;
echo "
- \n"; $date = affdate_heure($row['date']); $version_aff = $row['id_version']; $titre_version = typo($row['titre_version']); $titre_aff = $titre_version ? $titre_version : $date; if ($version_aff != $id_version) { $link = new Link(); $link->addVar('bt_revision', 'oui'); $link->addVar('id_version', $version_aff); $link->delVar('id_diff'); echo "\">$titre_aff"; } else { echo "$titre_aff"; } echo " (".typo($row['nom']).")"; if ($version_aff != $id_version) { echo " "; if ($version_aff == $id_diff) { echo "<:eq_historique_comparaison:>"; } else { $link = new Link(); $link->addVar('bt_revision', 'oui'); $link->addVar('id_version', $id_version); $link->addVar('id_diff', $version_aff); echo "(<:eq_historique_comparaison:>)"; } echo ""; } echo " \n"; } echo "
";
// pour l'affichage du virtuel
unset($virtuel);
if (substr($chapo, 0, 1) == '=') {
$virtuel = substr($chapo, 1);
}
if ($virtuel) {
echo _T('info_renvoi_article')." ".propre("[->$virtuel] ");
}
else {
echo "
";
}
?>
";
$revision_nbsp = ($options == "avancees"); // a regler pour relecture des nbsp dans les articles
echo justifier(propre_diff($chapo));
echo "
\n\n";
echo "";
echo justifier(propre_diff($texte));
echo "
";
if ($ps) {
echo "";
echo justifier(""._T('info_ps')." ".propre_diff($ps));
echo "
";
}
$revision_nbsp = false;
if ($les_notes) {
echo "";
echo justifier(""._T('info_notes')." : ".$les_notes);
echo "
";
}
}
echo "