Merge branch 'develop' into feature/gpm

This commit is contained in:
Djamil Legato
2014-09-06 15:23:36 -07:00
3 changed files with 30 additions and 5 deletions

View File

@@ -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",

View File

@@ -70,4 +70,9 @@ class Debugger
{
TracyDebugger::dump($var);
}
public static function barDump($var, $title = NULL, array $options = NULL)
{
TracyDebugger::barDump($var, $title, $options);
}
}

View File

@@ -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');
}
}