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

Introduction de la constante {{{_DIR_AIDE}}} indiquant le répertoire de cache...

Introduction de la constante {{{_DIR_AIDE}}} indiquant le répertoire de cache de la documentation, afin de pouvoir en n'avoir qu'un entre plusieurs sites mutualisés.
parent 1674cdb9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -54,7 +54,7 @@ function fichier_aide($lang_aide = '') { ...@@ -54,7 +54,7 @@ function fichier_aide($lang_aide = '') {
global $help_server; global $help_server;
if (!$lang_aide) $lang_aide = $GLOBALS['spip_lang']; 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); $lastm = @filemtime($fichier_aide);
$lastversion = @filemtime(_DIR_RESTREINT . 'inc_version.php'); $lastversion = @filemtime(_DIR_RESTREINT . 'inc_version.php');
...@@ -68,6 +68,7 @@ function fichier_aide($lang_aide = '') { ...@@ -68,6 +68,7 @@ function fichier_aide($lang_aide = '') {
include_spip('inc/distant'); include_spip('inc/distant');
if ($contenu = recuperer_page("$help_server/$lang_aide-aide.html")) { if ($contenu = recuperer_page("$help_server/$lang_aide-aide.html")) {
// mettre en cache (tant pis si on peut pas) // mettre en cache (tant pis si on peut pas)
sous_repertoire(_DIR_AIDE,'','',true);
ecrire_fichier ($fichier_aide, $contenu); ecrire_fichier ($fichier_aide, $contenu);
$lastm = time(); $lastm = time();
} }
...@@ -223,17 +224,18 @@ function help_img($regs) { ...@@ -223,17 +224,18 @@ function help_img($regs) {
if ($rep=="IMG" AND $lang=="cache" if ($rep=="IMG" AND $lang=="cache"
AND @file_exists($img_tex = _DIR_VAR.'cache-TeX/'.preg_replace(',^TeX-,', '', $file))) { AND @file_exists($img_tex = _DIR_VAR.'cache-TeX/'.preg_replace(',^TeX-,', '', $file))) {
readfile($img_tex); readfile($img_tex);
} else if (@file_exists($img = _DIR_CACHE . 'aide-'.$cache)) { } else if (@file_exists($img = _DIR_AIDE . $cache)) {
readfile($img); readfile($img);
} else if (@file_exists($img = _DIR_RACINE . 'AIDE/aide-'.$cache)) { } else if (@file_exists($img = _DIR_RACINE . 'AIDE/aide-'.$cache)) {
readfile($img); readfile($img);
} else if ($help_server) { } else if ($help_server) {
include_spip('inc/distant'); 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 = AND ($contenu =
recuperer_page("$help_server/$rep/$lang/$file"))) { recuperer_page("$help_server/$rep/$lang/$file"))) {
echo $contenu; echo $contenu;
ecrire_fichier (_DIR_CACHE . 'aide-'.$cache, $contenu); ecrire_fichier (_DIR_AIDE . $cache, $contenu);
} else } else
redirige_par_entete("$help_server/$rep/$lang/$file"); redirige_par_entete("$help_server/$rep/$lang/$file");
} }
......
...@@ -93,7 +93,7 @@ function statistiques_lang_ok() ...@@ -93,7 +93,7 @@ function statistiques_lang_ok()
} }
echo "\n<tr style='background-color: $couleur'>"; 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='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;'>"; echo "<td style='border-bottom: 1px solid #cccccc;'>";
......
...@@ -1195,7 +1195,8 @@ function spip_initialisation($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) { ...@@ -1195,7 +1195,8 @@ function spip_initialisation($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
define('_DIR_TRANSFERT', $ti . "upload/"); define('_DIR_TRANSFERT', $ti . "upload/");
define('_DIR_CACHE', $ti . "cache/"); define('_DIR_CACHE', $ti . "cache/");
define('_DIR_CACHE_XML', _DIR_CACHE . "xml/"); 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('_DIR_TMP', $ti);
define('_FILE_META', $ti . 'meta_cache.txt'); define('_FILE_META', $ti . 'meta_cache.txt');
......
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