@@ -3,8 +3,9 @@ declare(strict_types=1);
3
3
4
4
namespace Nette \Bridges \DatabaseTracy ;
5
5
6
- use Nette \Database \Helpers ;
6
+ use Nette \Database \Helpers as DbHelpers ;
7
7
use Tracy ;
8
+ use Tracy \Helpers ;
8
9
9
10
?>
10
11
<style class="tracy-debug">
@@ -13,8 +14,8 @@ use Tracy;
13
14
#tracy-debug .nette-DbConnectionPanel-explain td { white-space: pre }
14
15
</style>
15
16
16
- <h1 title="<?= htmlspecialchars ($ connection ->getDsn (), ENT_QUOTES , ' UTF-8 ' ) ?> ">Queries: <?php
17
- echo $ count , ($ totalTime ? sprintf (', time: %0.3f ms ' , $ totalTime * 1000 ) : '' ), ', ' , htmlspecialchars ($ name, ENT_NOQUOTES , ' UTF-8 ' ) ?> </h1>
17
+ <h1 title="<?= Helpers:: escapeHtml ($ connection ->getDsn ()) ?> ">Queries: <?php
18
+ echo $ count , ($ totalTime ? sprintf (', time: %0.3f ms ' , $ totalTime * 1000 ) : '' ), ', ' , Helpers:: escapeHtml ($ name ) ?> </h1>
18
19
19
20
<div class="tracy-inner">
20
21
<div class="tracy-inner-container">
@@ -27,31 +28,31 @@ use Tracy;
27
28
<tr>
28
29
<td>
29
30
<?php if ($ error ): ?>
30
- <span title="<?= htmlspecialchars ($ error, ENT_IGNORE | ENT_QUOTES , ' UTF-8 ' ) ?> ">ERROR</span>
31
+ <span title="<?= Helpers:: escapeHtml ($ error ) ?> ">ERROR</span>
31
32
<?php elseif ($ time !== null ): echo sprintf ('%0.3f ' , $ time * 1000 ); endif ?>
32
33
<?php if ($ explain ): ?>
33
34
<br /><a class="tracy-toggle tracy-collapsed" data-tracy-ref="^tr .nette-DbConnectionPanel-explain">explain</a>
34
35
<?php endif ?>
35
36
</td>
36
- <td class="nette-DbConnectionPanel-sql"><?= Helpers ::dumpSql ($ sql , $ params , $ connection ) ?>
37
+ <td class="nette-DbConnectionPanel-sql"><?= DbHelpers ::dumpSql ($ sql , $ params , $ connection ) ?>
37
38
<?php if ($ explain ): ?>
38
39
<table class="tracy-collapsed nette-DbConnectionPanel-explain">
39
40
<tr>
40
41
<?php foreach ($ explain [0 ] as $ col => $ foo ): ?>
41
- <th><?= htmlspecialchars (( string ) $ col, ENT_NOQUOTES , ' UTF-8 ' ) ?> </th>
42
+ <th><?= Helpers:: escapeHtml ( $ col ) ?> </th>
42
43
<?php endforeach ?>
43
44
</tr>
44
45
<?php foreach ($ explain as $ row ): ?>
45
46
<tr>
46
47
<?php foreach ($ row as $ col ): ?>
47
- <td><?= htmlspecialchars (( string ) $ col, ENT_NOQUOTES , ' UTF-8 ' ) ?> </td>
48
+ <td><?= Helpers:: escapeHtml ( $ col ) ?> </td>
48
49
<?php endforeach ?>
49
50
</tr>
50
51
<?php endforeach ?>
51
52
</table>
52
53
<?php endif ?>
53
54
<?php if ($ source ) {
54
- echo substr_replace (Tracy \ Helpers::editorLink ($ source [0 ], $ source [1 ]), ' class="nette-DbConnectionPanel-source" ' , 2 , 0 );
55
+ echo substr_replace (Helpers::editorLink ($ source [0 ], $ source [1 ]), ' class="nette-DbConnectionPanel-source" ' , 2 , 0 );
55
56
} ?>
56
57
</td>
57
58
<td><?= $ rows ?> </td>
0 commit comments