Minor adjustments

This commit is contained in:
Kijin Sung 2016-02-12 20:33:05 +09:00
parent 4b835bfe71
commit 8394afce74
4 changed files with 32 additions and 35 deletions

View file

@ -364,6 +364,7 @@ class DB
$log['module'] = $site_module_info->module;
$log['act'] = Context::get('act');
$log['time'] = date('Y-m-d H:i:s');
$log['backtrace'] = array();
$bt = version_compare(PHP_VERSION, '5.3.6', '>=') ? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) : debug_backtrace();
@ -371,6 +372,7 @@ class DB
{
if($call['function'] == 'executeQuery' || $call['function'] == 'executeQueryArray')
{
$log['backtrace'] = array_slice($bt, $no);
$call_no = $no;
$call_no++;
$log['called_file'] = $bt[$call_no]['file'];

View file

@ -121,14 +121,15 @@ class DisplayHandler extends Handler
// results directly output
print $output;
// debugOutput output
$this->content_size = strlen($output);
print $this->getDebugInfo();
// call a trigger after display
ModuleHandler::triggerCall('display', 'after', $output);
// debugOutput output
$this->content_size = strlen($output);
print $this->getDebugInfo($output);
flushSlowlog();
}
@ -137,7 +138,7 @@ class DisplayHandler extends Handler
*
* @return string
*/
public function getDebugInfo()
public function getDebugInfo(&$output)
{
// Check if debugging is enabled for this request.
if (!config('debug.enabled'))