From b95a33c1b01d6be489636c6ab27ab118803b9f81 Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Fri, 3 Mar 2006 09:41:48 +0000
Subject: [PATCH] compatilibite page.php3 pour INCLURE

---
 ecrire/public/compilo.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ecrire/public/compilo.php b/ecrire/public/compilo.php
index 93f4500d6b..2ce3beb140 100644
--- a/ecrire/public/compilo.php
+++ b/ecrire/public/compilo.php
@@ -50,10 +50,14 @@ function calculer_inclure($struct, $descr, &$boucles, $id_boucle) {
 		$path = _DIR_RESTREINT.'public.php';
 
 	# sinon chercher le fichier, eventuellement en changeant.php3 => .php
+	# et en gardant la compatibilite <INCLURE(page.php3)>
 	else if (!($path = find_in_path($fichier))
 	AND !(
 		preg_match(',^(.*[.]php)3$,', $fichier, $r)
-		AND $path = find_in_path($r[1]))
+		AND (
+			$path = find_in_path($r[1])
+			OR $path = ($[1] == 'page.php')? _DIR_RESTREINT.'public.php':'')
+		)
 	) {
 		spip_log("ERREUR: <INCLURE($fichier)> impossible");
 		erreur_squelette(_T('zbug_info_erreur_squelette'),
-- 
GitLab