diff --git a/ecrire/inc/diff.php b/ecrire/inc/diff.php index b2596620c2d7e238d8c8d340b51209fdb957d03e..64842fe68267a77de7a3d1dec56149dce8132a0f 100644 --- a/ecrire/inc/diff.php +++ b/ecrire/inc/diff.php @@ -323,7 +323,18 @@ class DiffPhrase { $punct = $regs[1] ? $regs[1] : $regs[6]; $milieu = ""; if ($punct) { + // notes + if ($punct == '[[') { + $avant = substr($texte, 0, $p) . $regs[5] . $punct; + $texte = $regs[4] . substr($texte, $p + $l); + } + else + if ($punct == ']]') { + $avant = substr($texte, 0, $p) . $regs[5] . $punct; + $texte = substr($texte, $p + $l); + } // Attacher les raccourcis fermants au mot precedent + else if (preg_match(',^[\]}]+$,', $punct)) { $avant = substr($texte, 0, $p) . $regs[5] . $punct; $texte = $regs[4] . substr($texte, $p + $l); diff --git a/ecrire/inc/revisions.php b/ecrire/inc/revisions.php index d84f82bed647cee920665e0e18a9e3b10026500b..3e1985c1d802eeb603be75d2d268e0e0405ca7d7 100644 --- a/ecrire/inc/revisions.php +++ b/ecrire/inc/revisions.php @@ -573,8 +573,10 @@ function propre_diff($texte) { foreach ($regs as $c => $reg) { $bal = (!$reg[1]) ? $reg[0] : "</$reg[2]>"; $texte = str_replace('@@@SPIP_DIFF'.$c.'@@@', $bal, $texte); - $GLOBALS['les_notes'] = str_replace('@@@SPIP_DIFF'.$c.'@@@', $$bal, $GLOBALS['les_notes']); + $GLOBALS['les_notes'] = str_replace('@@@SPIP_DIFF'.$c.'@@@', $bal, $GLOBALS['les_notes']); } + + // quand le dernier tag est ouvrant le refermer ... $reg = end($regs); if (!$reg[1] AND $reg[2]) $texte.="</$reg[2]>"; diff --git a/ecrire/inc/suivi_versions.php b/ecrire/inc/suivi_versions.php index 9b8a781b976295efcfd69378b81c463401ef4ebc..85a259e9df2fc8d561cbc5099b1a143016c26a1e 100644 --- a/ecrire/inc/suivi_versions.php +++ b/ecrire/inc/suivi_versions.php @@ -257,7 +257,7 @@ function revision_comparee($id_article, $id_version, $format='diff', $id_diff=NU AND isset($old[$champ])) { // cas particulier : id_rubrique if (in_array($champ, array('id_rubrique'))) { - $textes[$champ] = _T('version_deplace_rubrique', + $textes[$champ] = _T('version_deplace_rubrique', array('from'=> titre_rubrique($old[$champ]) ,'to'=>titre_rubrique($new[$champ])) ); @@ -269,7 +269,6 @@ function revision_comparee($id_article, $id_version, $format='diff', $id_diff=NU $n = preparer_diff($new[$champ]); $o = preparer_diff($old[$champ]); $textes[$champ] = afficher_diff($diff->comparer($n,$o)); - if ($format == 'diff' OR $format == 'apercu') $textes[$champ] = afficher_para_modifies($textes[$champ], ($format == 'apercu')); }