From 89e67f3666686f2ecfae8d4a65deddb27e9b0258 Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Sat, 10 Jun 2023 13:54:25 +0200
Subject: [PATCH] chores: supprimer le support de la (tres) vieille syntaxe
 `[(#EXPOSER|on,off)]` totalement derogatoire

---
 ecrire/public/normaliser.php   | 21 ---------------------
 ecrire/public/phraser_html.php |  7 +------
 2 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/ecrire/public/normaliser.php b/ecrire/public/normaliser.php
index a61e5fe412..5f467728a1 100644
--- a/ecrire/public/normaliser.php
+++ b/ecrire/public/normaliser.php
@@ -93,27 +93,6 @@ function phraser_vieux_recherche($p) {
 	}
 }
 
-// Gerer la notation [(#EXPOSER|on,off)]
-function phraser_vieux_exposer($p) {
-	if ($a = $p->fonctions) {
-		preg_match('#([^,]*)(,(.*))?#', (string) $a[0][0], $regs);
-		$args = [];
-		if ($regs[1]) {
-			$a = new Texte();
-			$a->texte = $regs[1];
-			$args = ['', [$a]];
-			if ($regs[3]) {
-				$a = new Texte();
-				$a->texte = $regs[3];
-				$args[] = [$a];
-			}
-		}
-		$p->param[0] = $args;
-		$p->fonctions = [];
-		$p->nom_champ = 'EXPOSE';
-	}
-}
-
 function phraser_vieux_modele($p) {
  normaliser_args_inclumodel($p);
 }
diff --git a/ecrire/public/phraser_html.php b/ecrire/public/phraser_html.php
index f577422629..3912df8444 100644
--- a/ecrire/public/phraser_html.php
+++ b/ecrire/public/phraser_html.php
@@ -627,12 +627,7 @@ function phraser_champs_interieurs(string $texte, int $no_ligne, string $sep): a
 
 function phraser_vieux(&$champ) {
 	$nom = $champ->nom_champ;
-	if ($nom == 'EXPOSER') {
-		if (!function_exists('phraser_vieux_exposer')) {
-			include_spip('public/normaliser');
-		}
-		phraser_vieux_exposer($champ);
-	} elseif ($champ->param) {
+	if ($champ->param) {
 		if ($nom == 'FORMULAIRE_RECHERCHE') {
 			if (!function_exists('phraser_vieux_recherche')) {
 				include_spip('public/normaliser');
-- 
GitLab