|
|
|
@ -56,7 +56,7 @@ if (!isset($EXPORT_tables_noexport)){
|
|
|
|
|
} |
|
|
|
|
$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){ |
|
|
|
|
$archive = _SPIP_DUMP; |
|
|
|
|
if ($gz) $archive .= '.gz'; |
|
|
|
@ -67,13 +67,18 @@ function export_nom_fichier_dump($dir,$gz=true){
|
|
|
|
|
return $nom; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// http://doc.spip.org/@exec_export_all_dist |
|
|
|
|
// http://doc.spip.org/@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; |
|
|
|
|
|
|
|
|
|
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 { |
|
|
|
|
$dir = _DIR_TRANSFERT . $connect_login . '/'; |
|
|
|
|
} |
|
|
|
@ -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){ |
|
|
|
|
// a ameliorer par un preg_file |
|
|
|
|
// si le rammassage est interrompu par un timeout, on perd des morceaux |
|
|
|
@ -282,7 +287,7 @@ function ramasse_parties($archive, $gz, $partfile){
|
|
|
|
|
// |
|
|
|
|
// 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) { |
|
|
|
|
static $etape_affichee=array(); |
|
|
|
|
static $table_fields=array(); |
|
|
|
@ -355,7 +360,7 @@ function export_objets($table, $primary, $liens, $file = 0, $gz = false, $etape_
|
|
|
|
|
|
|
|
|
|
// 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) { |
|
|
|
|
global $connect_toutes_rubriques ; |
|
|
|
|
$string = ''; |
|
|
|
@ -385,18 +390,18 @@ function build_while($file,$gz, $nfields, &$pos_in_table, $result, &$status_dump
|
|
|
|
|
return $string; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// http://doc.spip.org/@build_begin_tag |
|
|
|
|
// http://doc.spip.org/@build_begin_tag |
|
|
|
|
function build_begin_tag($tag) { |
|
|
|
|
return "<$tag>\n"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// http://doc.spip.org/@build_end_tag |
|
|
|
|
// http://doc.spip.org/@build_end_tag |
|
|
|
|
function build_end_tag($tag) { |
|
|
|
|
return "</$tag>\n\n"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 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) { |
|
|
|
|
return str_replace('<', '<', str_replace('&', '&', $string)); |
|
|
|
|
} |
|
|
|
|