From a4d2b1b3059817fdced24050949c957213e4d179 Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Sat, 14 Nov 2009 06:57:02 +0000
Subject: [PATCH] =?UTF-8?q?Declarer=20les=20fichiers=20concernant=20les=20?=
 =?UTF-8?q?plugins=20dans=20spip=5Finitialisation=5Fcore,=20dans=20spip=5F?=
 =?UTF-8?q?initialisation=5Fsuite=20c'est=20trop=20tard=20(Kent1).=20Et=20?=
 =?UTF-8?q?tant=20qu'=C3=A0=20faire,=20les=20mettre=20dans=20le=20sous-r?=
 =?UTF-8?q?=C3=A9pertoire=20cache,=20puisque=20ce=20sont=20des=20fichiers?=
 =?UTF-8?q?=20de=20caches.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/inc/utils.php | 43 ++++++++++++++++++++++++-------------------
 1 file changed, 24 insertions(+), 19 deletions(-)

diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index 1bc98fa51b..ea12a23eaa 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -1089,8 +1089,13 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
 	static $too_late = 0;
 	if ($too_late++) return;
 
-	// Le charset par defaut lors de l'installation
-	define('_DEFAULT_CHARSET', 'utf-8');
+	// Declaration des repertoires
+
+	// le nom du repertoire plugins/ activables/desactivables
+	define('_DIR_PLUGINS', _DIR_RACINE . "plugins/");
+
+	// le nom du repertoire des extensions/ permanentes du core, toujours actives
+	define('_DIR_EXTENSIONS', _DIR_RACINE . "extensions/");
 
 	define('_DIR_IMG', $pa);
 	define('_DIR_LOGOS', $pa);
@@ -1105,26 +1110,30 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
 	define('_DIR_AIDE',  _DIR_CACHE . "aide/");
 	define('_DIR_TMP', $ti);
 
-	# attention .php obligatoire pour ecrire_fichier_securise
-	define('_FILE_META', $ti . 'meta_cache.php');
-
 	define('_DIR_VAR', $ta);
 
 	define('_DIR_ETC', $pi);
 	define('_DIR_CONNECT', $pi);
 	define('_DIR_CHMOD', $pi);
 
-	define('_DIR_LOG', _DIR_TMP);
-	define('_FILE_LOG', 'spip');
-	define('_FILE_LOG_SUFFIX', '.log');
-
-	define('_MAX_LOG', 100);
-
 	if (!isset($GLOBALS['test_dirs']))
 	  // Pas $pi car il est bon de le mettre hors ecriture apres intstall
 	  // il sera rajoute automatiquement si besoin a l'etape 2 de l'install
 		$GLOBALS['test_dirs'] =  array($pa, $ti, $ta);
 
+	// Declaration des fichiers
+
+	define('_CACHE_PLUGINS_OPT', _DIR_CACHE . "charger_plugins_options.php");
+	define('_CACHE_PLUGINS_FCT', _DIR_CACHE . "charger_plugins_fonctions.php");
+	define('_CACHE_PLUGINS_VERIF', _DIR_CACHE . "verifier_plugins.txt");
+	define('_CACHE_PIPELINES',  _DIR_CACHE."charger_pipelines.php");
+
+	# attention .php obligatoire pour ecrire_fichier_securise
+	define('_FILE_META', $ti . 'meta_cache.php');
+	define('_DIR_LOG', _DIR_TMP);
+	define('_FILE_LOG', 'spip');
+	define('_FILE_LOG_SUFFIX', '.log');
+
 	// Le fichier de connexion a la base de donnees
 	// tient compte des anciennes versions (inc_connect...)
 	define('_FILE_CONNECT_INS', 'connect');
@@ -1153,11 +1162,11 @@ function spip_initialisation_core($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
 	// Se mefier des fichiers mal remplis!
 	if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', 0777);
 
-	// le nom du repertoire plugins/ activables/desactivables
-	define('_DIR_PLUGINS', _DIR_RACINE . "plugins/");
+	// Le charset par defaut lors de l'installation
+	define('_DEFAULT_CHARSET', 'utf-8');
 
-	// le nom du repertoire des extensions/ permanentes du core, toujours actives
-	define('_DIR_EXTENSIONS', _DIR_RACINE . "extensions/");
+	// La taille des Log
+	define('_MAX_LOG', 100);
 
 	// Sommes-nous dans l'empire du Mal ?
 	// (ou sous le signe du Pingouin, ascendant GNU ?)
@@ -1290,10 +1299,6 @@ function spip_initialisation_suite() {
 	define('_ACCESS_FILE_NAME', '.htaccess');
 	define('_AUTH_USER_FILE', '.htpasswd');
 	define('_SPIP_DUMP', 'dump@nom_site@@stamp@.xml');
-	define('_CACHE_PLUGINS_OPT', _DIR_TMP . "charger_plugins_options.php");
-	define('_CACHE_PLUGINS_FCT', _DIR_TMP . "charger_plugins_fonctions.php");
-	define('_CACHE_PLUGINS_VERIF', _DIR_TMP . "verifier_plugins.txt");
-	define('_CACHE_PIPELINES',  _DIR_TMP."charger_pipelines.php");
 	define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt');
 	define('_CACHE_RUBRIQUES_MAX', 500);
 
-- 
GitLab