From 16ed55ca5f0391371ef931b6705f23426ff64e4b Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Wed, 1 Mar 2006 11:04:44 +0000
Subject: [PATCH] recalculer le path si des plugins sont apparus

---
 ecrire/inc_utils.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ecrire/inc_utils.php b/ecrire/inc_utils.php
index b3de624110..f30e7c22df 100644
--- a/ecrire/inc_utils.php
+++ b/ecrire/inc_utils.php
@@ -628,11 +628,13 @@ function texte_script($texte) {
 
 function find_in_path ($filename, $sinon = NULL, $path='AUTO') {
 	static $autopath;
+	static $count=0; # nombre de plugins ; s'il change il faut refaire le path
 
 	// Chemin standard depuis l'espace public
 	if ($path == 'AUTO') {
-		if (!$autopath) {
-
+		if (!$autopath
+		OR ($count != ($c = count($GLOBALS['plugins'])))) {
+			$count = $c;
 			// Depuis l'espace prive, remonter d'un cran, sauf pour :
 			// - les absolus (/) ; - les locaux (./) ; les remontees (../)
 			if (_DIR_RACINE) {
-- 
GitLab