From d6793241a2fe6ebc3f46b1eb033280dc059d450d Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Mon, 29 Oct 2007 23:09:30 +0000 Subject: [PATCH] =?UTF-8?q?Introduction=20de=20la=20constante=20{{{=5FDIR?= =?UTF-8?q?=5FAIDE}}}=20indiquant=20le=20r=C3=A9pertoire=20de=20cache=20de?= =?UTF-8?q?=20la=20documentation,=20afin=20de=20pouvoir=20en=20n'avoir=20q?= =?UTF-8?q?u'un=20entre=20plusieurs=20sites=20mutualis=C3=A9s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/exec/aide_index.php | 10 ++++++---- ecrire/exec/statistiques_lang.php | 2 +- ecrire/inc/utils.php | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ecrire/exec/aide_index.php b/ecrire/exec/aide_index.php index bbd8dadb43..e2c38d1912 100644 --- a/ecrire/exec/aide_index.php +++ b/ecrire/exec/aide_index.php @@ -54,7 +54,7 @@ function fichier_aide($lang_aide = '') { global $help_server; if (!$lang_aide) $lang_aide = $GLOBALS['spip_lang']; - $fichier_aide = _DIR_CACHE . "aide-$lang_aide-aide.html"; + $fichier_aide = _DIR_AIDE . "$lang_aide-aide.html"; $lastm = @filemtime($fichier_aide); $lastversion = @filemtime(_DIR_RESTREINT . 'inc_version.php'); @@ -68,6 +68,7 @@ function fichier_aide($lang_aide = '') { include_spip('inc/distant'); if ($contenu = recuperer_page("$help_server/$lang_aide-aide.html")) { // mettre en cache (tant pis si on peut pas) + sous_repertoire(_DIR_AIDE,'','',true); ecrire_fichier ($fichier_aide, $contenu); $lastm = time(); } @@ -223,17 +224,18 @@ function help_img($regs) { if ($rep=="IMG" AND $lang=="cache" AND @file_exists($img_tex = _DIR_VAR.'cache-TeX/'.preg_replace(',^TeX-,', '', $file))) { readfile($img_tex); - } else if (@file_exists($img = _DIR_CACHE . 'aide-'.$cache)) { + } else if (@file_exists($img = _DIR_AIDE . $cache)) { readfile($img); } else if (@file_exists($img = _DIR_RACINE . 'AIDE/aide-'.$cache)) { readfile($img); } else if ($help_server) { include_spip('inc/distant'); - if (ecrire_fichier(_DIR_CACHE . 'aide-test', "test") + sous_repertoire(_DIR_AIDE,'','',true); + if (ecrire_fichier(_DIR_AIDE . "test") AND ($contenu = recuperer_page("$help_server/$rep/$lang/$file"))) { echo $contenu; - ecrire_fichier (_DIR_CACHE . 'aide-'.$cache, $contenu); + ecrire_fichier (_DIR_AIDE . $cache, $contenu); } else redirige_par_entete("$help_server/$rep/$lang/$file"); } diff --git a/ecrire/exec/statistiques_lang.php b/ecrire/exec/statistiques_lang.php index ee4e191983..60b9d09be1 100644 --- a/ecrire/exec/statistiques_lang.php +++ b/ecrire/exec/statistiques_lang.php @@ -93,7 +93,7 @@ function statistiques_lang_ok() } echo "\n<tr style='background-color: $couleur'>"; - $dir=lang_dir($lang,'',' dir=rtl'); + $dir=lang_dir($lang,'',' dir="rtl"'); echo "<td style='width: 100%; border-bottom: 1px solid #cccccc;'><span class='verdana2'$dir><span style='float: $spip_lang_right;'>$pourcent%</span>".traduire_nom_langue($lang)."</span></td>"; echo "<td style='border-bottom: 1px solid #cccccc;'>"; diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php index ea179d2884..43d821784f 100644 --- a/ecrire/inc/utils.php +++ b/ecrire/inc/utils.php @@ -1195,7 +1195,8 @@ function spip_initialisation($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) { define('_DIR_TRANSFERT', $ti . "upload/"); define('_DIR_CACHE', $ti . "cache/"); define('_DIR_CACHE_XML', _DIR_CACHE . "xml/"); - define('_DIR_SKELS', $ti . "cache/skel/"); + define('_DIR_SKELS', _DIR_CACHE . "skel/"); + define('_DIR_AIDE', _DIR_CACHE . "aide/"); define('_DIR_TMP', $ti); define('_FILE_META', $ti . 'meta_cache.txt'); -- GitLab