From 081bc3ee4ad1d3a37a91f05fe52c935d24e70110 Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Sun, 16 Jul 2006 21:51:30 +0000
Subject: [PATCH] encore un peu plus complique pour le noyau: il depend du PATH
 qui n'est pas toujours identique (cf. sedna pour un exemple)

---
 ecrire/inc/utils.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index 471e7e438d..bb413f18d3 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -75,8 +75,8 @@ function charger_fonction($nom, $dossier='exec', $continue=false) {
 function include_spip($f, $include = true) {
 
 	// deja charge (nom) ?
-	if (isset($GLOBALS['meta']['noyau'][_DIR_RESTREINT][$f])) {
-		$s = $GLOBALS['meta']['noyau'][_DIR_RESTREINT][$f];
+	if (isset($GLOBALS['meta']['noyau'][_NOYAU][$f])) {
+		$s = $GLOBALS['meta']['noyau'][_NOYAU][$f];
 		if ($include && $s) {
 			include_once $s;
 		}
@@ -84,10 +84,10 @@ function include_spip($f, $include = true) {
 	}
 	if (!$s = find_in_path($f . '.php')
 	AND (!_EXTENSION_PHP OR !$s = find_in_path($f . '.php3'))) {
-		return $GLOBALS['meta']['noyau'][_DIR_RESTREINT][$f] = false;
+		return $GLOBALS['meta']['noyau'][_NOYAU][$f] = false;
 	}
 
-	$GLOBALS['meta']['noyau'][_DIR_RESTREINT][$f] = $s;
+	$GLOBALS['meta']['noyau'][_NOYAU][$f] = $s;
 	if (!defined('ecrire_noyau'))
 		define('ecrire_noyau', 1);
 
@@ -607,6 +607,7 @@ function find_in_path ($filename) {
 				$dir .= "/";
 			$path_a[] = $dir;
 		}
+		define('_NOYAU', md5(join(':', $path_a)));
 	}
 
 	// Parcourir le chemin
-- 
GitLab