Skip to content
Extraits de code Groupes Projets
Valider b68a53b6 rédigé par JamesRezo's avatar JamesRezo :tada:
Parcourir les fichiers

suppression du répertoire de dump à l'installation. Il est créé à la volée,...

suppression du répertoire de dump à l'installation. Il est créé à la volée, comme CACHE/, sessions/ et les autres.

Bientôt la même chose pour upload/ et ses sous-répertoires.
parent 9cb486a7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -14,10 +14,3 @@ IMG/siteon* ...@@ -14,10 +14,3 @@ IMG/siteon*
IMG/test_* IMG/test_*
ecrire/inc_connect.php3 ecrire/inc_connect.php3
ecrire/inc_meta_cache.php3 ecrire/inc_meta_cache.php3
tmp/data/.htaccess
tmp/data/.htpasswd
tmp/data/.htpasswd-admin
tmp/data/.index
tmp/data/inc_meta_cache.php3
tmp/data/session_*
tmp/data/spip.log*
...@@ -38,7 +38,12 @@ function exec_admin_tech_dist() ...@@ -38,7 +38,12 @@ function exec_admin_tech_dist()
debut_boite_info(); debut_boite_info();
echo _T('info_gauche_admin_tech'); echo _T('info_gauche_admin_tech');
fin_boite_info(); fin_boite_info();
$dir_dump = _DIR_DUMP; $repertoire = _DIR_DUMP;
if(!@file_exists($repertoire)) {
$repertoire = preg_replace(','._DIR_TMP.',', '', $repertoire);
$repertoire = sous_repertoire(_DIR_TMP, $repertoire);
}
$dir_dump = $repertoire;
} else { } else {
debut_gauche(); debut_gauche();
$dir_dump = _DIR_TRANSFERT . $connect_login . '/'; $dir_dump = _DIR_TRANSFERT . $connect_login . '/';
......
...@@ -56,7 +56,7 @@ if (!isset($EXPORT_tables_noexport)){ ...@@ -56,7 +56,7 @@ if (!isset($EXPORT_tables_noexport)){
} }
$GLOBALS['flag_ob_flush'] = function_exists('ob_flush'); $GLOBALS['flag_ob_flush'] = function_exists('ob_flush');
// http://doc.spip.org/@export_nom_fichier_dump // http://doc.spip.org/@export_nom_fichier_dump
function export_nom_fichier_dump($dir,$gz=true){ function export_nom_fichier_dump($dir,$gz=true){
$archive = _SPIP_DUMP; $archive = _SPIP_DUMP;
if ($gz) $archive .= '.gz'; if ($gz) $archive .= '.gz';
...@@ -67,13 +67,18 @@ function export_nom_fichier_dump($dir,$gz=true){ ...@@ -67,13 +67,18 @@ function export_nom_fichier_dump($dir,$gz=true){
return $nom; return $nom;
} }
// http://doc.spip.org/@exec_export_all_dist // http://doc.spip.org/@exec_export_all_dist
function exec_export_all_dist() function exec_export_all_dist()
{ {
global $archive, $debut_limit, $etape, $gz, $spip_version, $spip_version_affichee, $version_archive, $connect_login, $connect_toutes_rubriques; global $archive, $debut_limit, $etape, $gz, $spip_version, $spip_version_affichee, $version_archive, $connect_login, $connect_toutes_rubriques;
if ($connect_toutes_rubriques) { if ($connect_toutes_rubriques) {
$dir = _DIR_DUMP; $repertoire = _DIR_DUMP;
if(!@file_exists($repertoire)) {
$repertoire = preg_replace(','._DIR_TMP.',', '', $repertoire);
$repertoire = sous_repertoire(_DIR_TMP, $repertoire);
}
$dir = $repertoire;
} else { } else {
$dir = _DIR_TRANSFERT . $connect_login . '/'; $dir = _DIR_TRANSFERT . $connect_login . '/';
} }
...@@ -261,7 +266,7 @@ function exec_export_all_dist() ...@@ -261,7 +266,7 @@ function exec_export_all_dist()
} }
// http://doc.spip.org/@ramasse_parties // http://doc.spip.org/@ramasse_parties
function ramasse_parties($archive, $gz, $partfile){ function ramasse_parties($archive, $gz, $partfile){
// a ameliorer par un preg_file // a ameliorer par un preg_file
// si le rammassage est interrompu par un timeout, on perd des morceaux // si le rammassage est interrompu par un timeout, on perd des morceaux
...@@ -282,7 +287,7 @@ function ramasse_parties($archive, $gz, $partfile){ ...@@ -282,7 +287,7 @@ function ramasse_parties($archive, $gz, $partfile){
// //
// Exportation generique d'objets (fichier ou retour de fonction) // Exportation generique d'objets (fichier ou retour de fonction)
// //
// http://doc.spip.org/@export_objets // http://doc.spip.org/@export_objets
function export_objets($table, $primary, $liens, $file = 0, $gz = false, $etape_actuelle="", $nom_etape="",$limit=0) { function export_objets($table, $primary, $liens, $file = 0, $gz = false, $etape_actuelle="", $nom_etape="",$limit=0) {
static $etape_affichee=array(); static $etape_affichee=array();
static $table_fields=array(); static $table_fields=array();
...@@ -355,7 +360,7 @@ function export_objets($table, $primary, $liens, $file = 0, $gz = false, $etape_ ...@@ -355,7 +360,7 @@ function export_objets($table, $primary, $liens, $file = 0, $gz = false, $etape_
// Exporter les champs de la table // Exporter les champs de la table
// http://doc.spip.org/@build_while // http://doc.spip.org/@build_while
function build_while($file,$gz, $nfields, &$pos_in_table, $result, &$status_dump, $table, $fields) { function build_while($file,$gz, $nfields, &$pos_in_table, $result, &$status_dump, $table, $fields) {
global $connect_toutes_rubriques ; global $connect_toutes_rubriques ;
$string = ''; $string = '';
...@@ -385,18 +390,18 @@ function build_while($file,$gz, $nfields, &$pos_in_table, $result, &$status_dump ...@@ -385,18 +390,18 @@ function build_while($file,$gz, $nfields, &$pos_in_table, $result, &$status_dump
return $string; return $string;
} }
// http://doc.spip.org/@build_begin_tag // http://doc.spip.org/@build_begin_tag
function build_begin_tag($tag) { function build_begin_tag($tag) {
return "<$tag>\n"; return "<$tag>\n";
} }
// http://doc.spip.org/@build_end_tag // http://doc.spip.org/@build_end_tag
function build_end_tag($tag) { function build_end_tag($tag) {
return "</$tag>\n\n"; return "</$tag>\n\n";
} }
// Conversion texte -> xml (ajout d'entites) // Conversion texte -> xml (ajout d'entites)
// http://doc.spip.org/@text_to_xml // http://doc.spip.org/@text_to_xml
function text_to_xml($string) { function text_to_xml($string) {
return str_replace('<', '&lt;', str_replace('&', '&amp;', $string)); return str_replace('<', '&lt;', str_replace('&', '&amp;', $string));
} }
......
...@@ -43,7 +43,12 @@ function verifier_version_sauvegarde ($archive) { ...@@ -43,7 +43,12 @@ function verifier_version_sauvegarde ($archive) {
global $flag_gz, $connect_toutes_rubriques; global $flag_gz, $connect_toutes_rubriques;
if ($connect_toutes_rubriques) { if ($connect_toutes_rubriques) {
$dir = _DIR_DUMP; $repertoire = _DIR_DUMP;
if(!@file_exists($repertoire)) {
$repertoire = preg_replace(','._DIR_TMP.',', '', $repertoire);
$repertoire = sous_repertoire(_DIR_TMP, $repertoire);
}
$dir = $repertoire;
} else { } else {
$dir = _DIR_TRANSFERT . $connect_login . '/'; $dir = _DIR_TRANSFERT . $connect_login . '/';
} }
...@@ -127,7 +132,12 @@ function import_all_continue() ...@@ -127,7 +132,12 @@ function import_all_continue()
$request = unserialize($meta['request_restauration']); $request = unserialize($meta['request_restauration']);
if ($connect_toutes_rubriques) { if ($connect_toutes_rubriques) {
$dir = _DIR_DUMP; $repertoire = _DIR_DUMP;
if(!@file_exists($repertoire)) {
$repertoire = preg_replace(','._DIR_TMP.',', '', $repertoire);
$repertoire = sous_repertoire(_DIR_TMP, $repertoire);
}
$dir = $repertoire;
} else { } else {
$dir = _DIR_TRANSFERT . $connect_login . '/'; $dir = _DIR_TRANSFERT . $connect_login . '/';
} }
......
Vous pouvez effacer ce fichier sans dommages.
You can safely remove this 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