autoupdate - try to fix flush on fastcgi

This commit is contained in:
Ian 2014-02-12 16:13:22 +01:00
parent a33cd197e3
commit 76b33e617d
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,6 @@
1.0
* Trying to enable flush on FastCGI servers
0.9 0.9
* Check if ZIP extension is installed and loaded * Check if ZIP extension is installed and loaded

View file

@ -22,7 +22,7 @@ class serendipity_event_autoupdate extends serendipity_event {
$propbag->add('description', PLUGIN_EVENT_AUTOUPDATE_DESC); $propbag->add('description', PLUGIN_EVENT_AUTOUPDATE_DESC);
$propbag->add('stackable', false); $propbag->add('stackable', false);
$propbag->add('author', 'onli, Ian'); $propbag->add('author', 'onli, Ian');
$propbag->add('version', '0.9'); $propbag->add('version', '1.0');
$propbag->add('requirements', array( $propbag->add('requirements', array(
'serendipity' => '0.8', 'serendipity' => '0.8',
'php' => '5.1' 'php' => '5.1'
@ -58,6 +58,8 @@ class serendipity_event_autoupdate extends serendipity_event {
// Total processes // Total processes
$total = 3; $total = 3;
ob_implicit_flush(1);
// fake processing loop // fake processing loop
for($i=1; $i<=$total; $i++){ for($i=1; $i<=$total; $i++){
// Calculate the percentation // Calculate the percentation
@ -70,6 +72,9 @@ class serendipity_event_autoupdate extends serendipity_event {
document.getElementById("information").innerHTML="'.$percent.' processed."; document.getElementById("information").innerHTML="'.$percent.' processed.";
</script>'; </script>';
//this is for the buffer achieve the minimum size in order to flush data
echo str_repeat(' ',1024*64);
// Send output to browser immediately // Send output to browser immediately
flush(); flush();