Skip to content
Extraits de code Groupes Projets
Valider 131c6981 rédigé par cerdic's avatar cerdic
Parcourir les fichiers

ob_flush pas toujours disponible

parent 61ac1717
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -52,6 +52,7 @@ if (!isset($EXPORT_tables_noexport)){
$EXPORT_tables_noexport[]='spip_auteurs_messages';
}
}
$GLOBALS['flag_ob_flush'] = function_exists('ob_flush');
function exec_export_all_dist()
{
......@@ -190,7 +191,8 @@ function exec_export_all_dist()
array_unshift($tables_for_dump,$link_table);
}
ob_flush();flush();
if ($GLOBALS['flag_ob_flush']) ob_flush();
flush();
$status_dump = explode("::",$GLOBALS['meta']["status_dump"]);
$etape = $status_dump[2];
......@@ -201,7 +203,8 @@ function exec_export_all_dist()
export_objets($table, primary_index_table($table), $tables_for_link[$table], 0, false, $i, _T("info_sauvegarde").", $table");
}
ob_flush();flush();
if ($GLOBALS['flag_ob_flush']) ob_flush();
flush();
ramasse_parties($file, $gz, $partfile);
$f = ($gz) ? gzopen($file, "ab") : fopen($file, "ab");
......@@ -291,7 +294,8 @@ function export_objets($table, $primary, $liens, $file = 0, $gz = false, $etape_
}
if ($pos_in_table!=0)
echo "| ", $pos_in_table;
ob_flush();flush();
if ($GLOBALS['flag_ob_flush']) ob_flush();
flush();
if ($limit == 0) $limit=$total;
$result = spip_query("SELECT * FROM $table LIMIT $debut,$limit");
......@@ -326,11 +330,13 @@ function export_objets($table, $primary, $liens, $file = 0, $gz = false, $etape_
else if ($etape_actuelle < $etape_en_cours) {
if (!isset($etape_affichee[$etape_actuelle]))
echo "<li>", $etape_actuelle,'-',$nom_etape,"</li>";
ob_flush();flush();
if ($GLOBALS['flag_ob_flush']) ob_flush();
flush();
} else {
if (!isset($etape_affichee[$etape_actuelle]))
echo "<li> <font color='#999999'>",$etape_actuelle,'-',$nom_etape,'</font></li>';
ob_flush();flush();
if ($GLOBALS['flag_ob_flush']) ob_flush();
flush();
}
return array($string,$status_dump);
}
......
......@@ -21,6 +21,7 @@ include_spip('inc/auxbase');
global $IMPORT_tables_noerase;
$IMPORT_tables_noerase[]='spip_ajax_fonc';
$IMPORT_tables_noerase[]='spip_meta';
$GLOBALS['flag_ob_flush'] = function_exists('ob_flush');
function xml_fetch_tag($f, &$before, $gz=false, $skip_comment=true) {
global $buf, $abs_pos;
......@@ -234,7 +235,8 @@ function detruit_restaurateur()
function affiche_progression_javascript($abs_pos,$table="") {
global $affiche_progression_pourcent;
include_ecrire('inc_charsets');
ob_flush();flush();
if ($GLOBALS['flag_ob_flush']) ob_flush();
flush();
echo " -->\n<script type='text/javascript'><!--\n";
if ($abs_pos == '100 %') {
......@@ -258,7 +260,8 @@ function affiche_progression_javascript($abs_pos,$table="") {
echo "//--></script>\n<!--\n";
}
ob_flush();flush();
if ($GLOBALS['flag_ob_flush']) ob_flush();
flush();
}
......@@ -386,7 +389,8 @@ function import_all_continue()
echo ("<script language=\"JavaScript\" type=\"text/javascript\">window.setTimeout('location.href=\"".self()."\";',$max_time);</script>\n");
fin_page();
ob_flush();flush();
if ($GLOBALS['flag_ob_flush']) ob_flush();
flush();
echo "<font color='white'>\n<!--";
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter