Skip to content
Extraits de code Groupes Projets
Valider 7e2a7fba rédigé par esj's avatar esj
Parcourir les fichiers

installation compatible avec l'introduction de _DIR_INCLUDE (Thomas Noël)

parent 77a7cc82
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
if (defined("_ECRIRE_INC_VERSION")) return; if (defined("_ECRIRE_INC_VERSION")) return;
define("_ECRIRE_INC_VERSION", "1"); define("_ECRIRE_INC_VERSION", "1");
// 6 constantes incontournables et prioritaires // 7 constantes incontournables et prioritaires
define('_EXTENSION_PHP', '.php3'); # a etendre define('_EXTENSION_PHP', '.php3'); # a etendre
define('_DIR_RESTREINT_ABS', 'ecrire/'); define('_DIR_RESTREINT_ABS', 'ecrire/');
define('_DIR_RESTREINT', (!@is_dir(_DIR_RESTREINT_ABS) ? "" : _DIR_RESTREINT_ABS)); define('_DIR_RESTREINT', (!@is_dir(_DIR_RESTREINT_ABS) ? "" : _DIR_RESTREINT_ABS));
define('_DIR_INCLUDE', _DIR_RESTREINT);
define('_FILE_OPTIONS', _DIR_RESTREINT . 'mes_options.php3'); define('_FILE_OPTIONS', _DIR_RESTREINT . 'mes_options.php3');
define('_FILE_CONNECT_INS', (_DIR_RESTREINT . "inc_connect")); define('_FILE_CONNECT_INS', (_DIR_RESTREINT . "inc_connect"));
define_once('_FILE_CONNECT', define_once('_FILE_CONNECT',
...@@ -21,9 +22,14 @@ define_once('_FILE_CONNECT', ...@@ -21,9 +22,14 @@ define_once('_FILE_CONNECT',
if (!(_FILE_CONNECT OR defined('_ECRIRE_INSTALL') OR defined('_TEST_DIRS'))) { if (!(_FILE_CONNECT OR defined('_ECRIRE_INSTALL') OR defined('_TEST_DIRS'))) {
if (!defined("_INC_PUBLIC")) if (!defined("_INC_PUBLIC"))
{
header("Location: " . _DIR_RESTREINT . "install.php3"); header("Location: " . _DIR_RESTREINT . "install.php3");
}
else else
{ {
define('_DIR_IMG_PACK', (_DIR_RESTREINT . 'img_pack/'));
define('_DIR_LANG', (_DIR_RESTREINT . 'lang/'));
$db_ok = 0; $db_ok = 0;
include_ecrire ("inc_presentation.php3"); include_ecrire ("inc_presentation.php3");
install_debut_html(_T('info_travaux_titre')); install_debut_html(_T('info_travaux_titre'));
...@@ -33,6 +39,8 @@ if (!(_FILE_CONNECT OR defined('_ECRIRE_INSTALL') OR defined('_TEST_DIRS'))) { ...@@ -33,6 +39,8 @@ if (!(_FILE_CONNECT OR defined('_ECRIRE_INSTALL') OR defined('_TEST_DIRS'))) {
} }
} }
// *********** traiter les variables ************ // *********** traiter les variables ************
// Magic quotes : on n'en veut pas sur la base, // Magic quotes : on n'en veut pas sur la base,
// et on nettoie les GET/POST/COOKIE le cas echeant // et on nettoie les GET/POST/COOKIE le cas echeant
...@@ -244,7 +252,6 @@ if (@file_exists(_FILE_OPTIONS)) { ...@@ -244,7 +252,6 @@ if (@file_exists(_FILE_OPTIONS)) {
define_once('_DIR_PREFIX1', (_DIR_RESTREINT ? "" : "../")); define_once('_DIR_PREFIX1', (_DIR_RESTREINT ? "" : "../"));
define_once('_DIR_PREFIX2', _DIR_RESTREINT); define_once('_DIR_PREFIX2', _DIR_RESTREINT);
define_once('_DIR_INCLUDE', _DIR_RESTREINT);
// les repertoires des logos, des pieces rapportees, du CACHE et des sessions // les repertoires des logos, des pieces rapportees, du CACHE et des sessions
...@@ -561,11 +568,9 @@ function include_ecrire($file) { ...@@ -561,11 +568,9 @@ function include_ecrire($file) {
function include_lang($file) { function include_lang($file) {
$file = _DIR_LANG . $file; $file = _DIR_LANG . $file;
spip_log("include $file");
if ($GLOBALS['included_files'][$file]) return; if ($GLOBALS['included_files'][$file]) return;
$GLOBALS['included_files'][$file] = 1; $GLOBALS['included_files'][$file] = 1;
include($file); include($file);
spip_log("fin d'inclusion de $file");
} }
function include_plug($file) { function include_plug($file) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter