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

Forcer la mise en cache des DTD publiques meme si elle est commandée par le...

Forcer la mise en cache des DTD publiques meme si elle est commandée par le débusqueur, c'est pas elles qui sont en cause. Et renommage du sous-répertoire contenant ces caches: ça ne contient pas que des DTD dès à présent.
parent 17fd8c47
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -220,13 +220,14 @@ function sax_bug($data)
$data = html2unicode($data, true);
else {
list ($topelement, $avail, $grammaire, $rotlvl) = $r;
$file = _DIR_DTD . preg_replace('/[^\w.]/','_', $rotlvl) . '.gz';
$file = _DIR_CACHE_XML . preg_replace('/[^\w.]/','_', $rotlvl) . '.gz';
if (lire_fichier($file, $r))
$phraseur_xml->dtc = unserialize($r);
else {
include_spip('xml/analyser_dtd');
$phraseur_xml->dtc = charger_dtd($grammaire, $avail);
ecrire_fichier($file, serialize($phraseur_xml->dtc));
if ($avail == 'PUBLIC')
ecrire_fichier($file, serialize($phraseur_xml->dtc), true);
}
$trans = array();
......
......@@ -937,7 +937,7 @@ function spip_initialisation($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
define('_DIR_SESSIONS', $ti . "sessions/");
define('_DIR_TRANSFERT', $ti . "upload/");
define('_DIR_CACHE', $ti . "cache/");
define('_DIR_DTD', $ti . "cache/dtd/");
define('_DIR_CACHE_XML', $ti . "cache/xml/");
define('_DIR_SKELS', $ti . "cache/skel/");
define('_DIR_TMP', $ti);
......@@ -994,7 +994,7 @@ function spip_initialisation($pi=NULL, $pa=NULL, $ti=NULL, $ta=NULL) {
define('_DOCTYPE_ECRIRE',
// "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>\n");
"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");
// "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>\n");
// "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>\n");
// "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1 //EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>\n");
define('_DOCTYPE_AIDE',
"<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Frameset//EN' 'http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd'>");
......
......@@ -57,7 +57,7 @@ function analyser_dtd($loc, $avail, &$dtc)
if ($avail == 'SYSTEM')
$file = $loc;
else {
$file = sous_repertoire(_DIR_DTD);
$file = sous_repertoire(_DIR_CACHE_XML);
$file .= preg_replace('/[^\w.]/','_', $loc);
}
......@@ -68,7 +68,7 @@ function analyser_dtd($loc, $avail, &$dtc)
if ($avail == 'PUBLIC') {
include_spip('inc/distant');
if ($dtd = recuperer_page($loc))
ecrire_fichier($file, $dtd);
ecrire_fichier($file, $dtd, true);
}
}
......
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