mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 03:27:08 +02:00
Merge branch 'develop' into feature/gpm
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
"symfony/console": "~2.5",
|
||||
"symfony/event-dispatcher": "~2.5",
|
||||
"doctrine/cache": "~1.3",
|
||||
"tracy/tracy": "~2.2",
|
||||
"gregwar/image": "~2.0",
|
||||
"tracy/tracy": "2.3.*@dev",
|
||||
"gregwar/image": "~2.0",
|
||||
"ircmaxell/password-compat": "1.0.*",
|
||||
"mrclay/minify": "dev-master",
|
||||
"donatj/phpuseragentparser": "dev-master",
|
||||
|
||||
@@ -70,4 +70,9 @@ class Debugger
|
||||
{
|
||||
TracyDebugger::dump($var);
|
||||
}
|
||||
|
||||
public static function barDump($var, $title = NULL, array $options = NULL)
|
||||
{
|
||||
TracyDebugger::barDump($var, $title, $options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,10 +143,9 @@ class Grav extends Container
|
||||
|
||||
echo $this->output;
|
||||
|
||||
ob_end_flush();
|
||||
flush();
|
||||
|
||||
$this->fireEvent('onOutputRendered');
|
||||
|
||||
register_shutdown_function([$this, 'shutdown']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,4 +208,25 @@ class Grav extends Container
|
||||
$events = $this['events'];
|
||||
return $events->dispatch($eventName, $event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the final content length for the page and flush the buffer
|
||||
*
|
||||
*/
|
||||
public function shutdown()
|
||||
{
|
||||
set_time_limit(0);
|
||||
ignore_user_abort(true);
|
||||
|
||||
header('Content-length: ' . ob_get_length());
|
||||
header("Connection: close\r\n");
|
||||
|
||||
ob_end_flush();
|
||||
ob_flush();
|
||||
flush();
|
||||
|
||||
session_write_close();
|
||||
|
||||
$this->fireEvent('onShutdown');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user