From 71b7e471c5ac84d081094452f09dd89cef2879c5 Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Sat, 10 Jun 2023 13:52:27 +0200
Subject: [PATCH] =?UTF-8?q?chores:=20supprimer=20le=20support=20de=20la=20?=
 =?UTF-8?q?(tres)=20vieille=20syntaxe=20`#EMBED=5FDOCUMENT`=20pour=20`#MOD?=
 =?UTF-8?q?ELE{emb}`=20(disclaimer=20:=20elle=20est=20encore=20un=20peu=20?=
 =?UTF-8?q?pr=C3=A9sente=20dans=20certains=20squelettes/plugins)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

diff --git a/ecrire/public/normaliser.php b/ecrire/public/normaliser.php
index 2352607209..a61e5fe412 100644
--- a/ecrire/public/normaliser.php
+++ b/ecrire/public/normaliser.php
@@ -80,36 +80,6 @@ function phraser_logo_faux_filtres($nom) {
 }
 
 
-// La balise embed_document est a present le modele emb
-
-function phraser_vieux_emb(&$p) {
-	if (!is_array($p->param)) {
-		$p->param = [];
-	}
-
-	// Produire le premier argument {emb}
-	$texte = new Texte();
-	$texte->texte = 'emb';
-	$param = ['', [$texte]];
-
-	// Transformer les filtres en arguments
-	$paramCount = is_countable($p->param) ? count($p->param) : 0;
-	for ($i = 0; $i < $paramCount; $i++) {
-		if ($p->param[$i][0]) {
-			if (!strstr((string) $p->param[$i][0], '=')) {
-				break;
-			}# on a rencontre un vrai filtre, c'est fini
-			$texte = new Texte();
-			$texte->texte = $p->param[$i][0];
-			$param[] = [$texte];
-		}
-		array_shift($p->param);
-	}
-	array_unshift($p->param, $param);
-	spip_log('balise EMBED_DOCUMENT obsolete', 'vieilles_defs');
-	$p->nom_champ = 'MODELE';
-}
-
 // Vieux formulaire de recherch
 
 function phraser_vieux_recherche($p) {
diff --git a/ecrire/public/phraser_html.php b/ecrire/public/phraser_html.php
index 0fee8f9b21..f577422629 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 == 'EMBED_DOCUMENT') {
-		if (!function_exists('phraser_vieux_emb')) {
-			include_spip('public/normaliser');
-		}
-		phraser_vieux_emb($champ);
-	} elseif ($nom == 'EXPOSER') {
+	if ($nom == 'EXPOSER') {
 		if (!function_exists('phraser_vieux_exposer')) {
 			include_spip('public/normaliser');
 		}
-- 
GitLab