Browse Source

Added logging of view files.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
4ec0a61af1
  1. 1
      framework/yii/base/View.php
  2. 4
      framework/yii/debug/Module.php
  3. 2
      framework/yii/debug/panels/DbPanel.php

1
framework/yii/base/View.php

@ -267,6 +267,7 @@ class View extends Component
$renderer = $this->renderers[$ext];
$output = $renderer->render($this, $viewFile, $params);
} else {
Yii::info("Rendering view file: $viewFile", __METHOD__);
$output = $this->renderPhpFile($viewFile, $params);
}
$this->afterRender($viewFile, $output);

4
framework/yii/debug/Module.php

@ -81,8 +81,8 @@ class Module extends \yii\base\Module
echo '<div id="yii-debug-toolbar" data-url="' . $url . '" style="display:none"></div>';
/** @var View $view */
$view = $event->sender;
echo '<style>' . $view->renderFile(__DIR__ . '/views/default/toolbar.css') . '</style>';
echo '<script>' . $view->renderFile(__DIR__ . '/views/default/toolbar.js') . '</script>';
echo '<style>' . $view->renderPhpFile(__DIR__ . '/views/default/toolbar.css') . '</style>';
echo '<script>' . $view->renderPhpFile(__DIR__ . '/views/default/toolbar.js') . '</script>';
}
protected function corePanels()

2
framework/yii/debug/panels/DbPanel.php

@ -60,7 +60,7 @@ EOD;
<table class="table table-condensed table-bordered table-striped table-hover" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 80px;">Duration</th>
<th style="width: 80px;">Time</th>
<th>Query</th>
</tr>
</thead>

Loading…
Cancel
Save