uawdijnntqw1x1x1
IP : 216.73.216.38
Hostname : webm002.cluster111.gra.hosting.ovh.net
Kernel : Linux webm002.cluster111.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
atelierpru
/
provence
/
6bf95
/
..
/
..
/
paris
/
plugins-dist
/
revisions
/
afficher_diff
/
champ.php
/
/
<?php /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * * Copyright (c) 2001-2019 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * \***************************************************************************/ if (!defined('_ECRIRE_INC_VERSION')) { return; } include_spip('inc/diff'); /** * Afficher le diff d'un champ texte generique * * @param string $champ * @param string $old * @param string $new * @param string $format * apercu, diff ou complet * @return string */ function afficher_diff_champ_dist($champ, $old, $new, $format = 'diff') { // ne pas se compliquer la vie ! if ($old == $new) { $out = ($format != 'complet' ? '' : $new); } else { if ($f = charger_fonction($champ, 'afficher_diff', true)) { return $f($champ, $old, $new, $format); } $diff = new Diff(new DiffTexte); $n = preparer_diff($new); $o = preparer_diff($old); $out = afficher_diff($diff->comparer($n, $o)); if ($format == 'diff' or $format == 'apercu') { $out = afficher_para_modifies($out, ($format == 'apercu')); } } return $out; } /** * https://code.spip.net/@afficher_para_modifies * * @param string $texte * @param bool $court * @return string */ function afficher_para_modifies($texte, $court = false) { // Limiter la taille de l'affichage if ($court) { $max = 200; } else { $max = 2000; } $texte_ret = ''; $paras = explode("\n", $texte); for ($i = 0; $i < count($paras) and strlen($texte_ret) < $max; $i++) { if (strpos($paras[$i], '"diff-')) { $texte_ret .= $paras[$i] . "\n\n"; } # if (strlen($texte_ret) > $max) $texte_ret .= '(...)'; } $texte = $texte_ret; return $texte; }
/home/atelierpru/provence/6bf95/../../paris/plugins-dist/revisions/afficher_diff/champ.php