Browse Source

Added logging of view files.

tags/2.0.0-beta
Qiang Xue 12 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]; $renderer = $this->renderers[$ext];
$output = $renderer->render($this, $viewFile, $params); $output = $renderer->render($this, $viewFile, $params);
} else { } else {
Yii::info("Rendering view file: $viewFile", __METHOD__);
$output = $this->renderPhpFile($viewFile, $params); $output = $this->renderPhpFile($viewFile, $params);
} }
$this->afterRender($viewFile, $output); $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>'; echo '<div id="yii-debug-toolbar" data-url="' . $url . '" style="display:none"></div>';
/** @var View $view */ /** @var View $view */
$view = $event->sender; $view = $event->sender;
echo '<style>' . $view->renderFile(__DIR__ . '/views/default/toolbar.css') . '</style>'; echo '<style>' . $view->renderPhpFile(__DIR__ . '/views/default/toolbar.css') . '</style>';
echo '<script>' . $view->renderFile(__DIR__ . '/views/default/toolbar.js') . '</script>'; echo '<script>' . $view->renderPhpFile(__DIR__ . '/views/default/toolbar.js') . '</script>';
} }
protected function corePanels() 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;"> <table class="table table-condensed table-bordered table-striped table-hover" style="table-layout: fixed;">
<thead> <thead>
<tr> <tr>
<th style="width: 80px;">Duration</th> <th style="width: 80px;">Time</th>
<th>Query</th> <th>Query</th>
</tr> </tr>
</thead> </thead>

Loading…
Cancel
Save