@@ -27,7 +27,7 @@ public static function getModuleInfo() {
27
27
'summary ' => __ ('Tracy debugger from Nette with many PW specific custom tools. ' , __FILE__ ),
28
28
'author ' => 'Adrian Jones ' ,
29
29
'href ' => 'https://processwire.com/talk/forum/58-tracy-debugger/ ' ,
30
- 'version ' => '4.26.82 ' ,
30
+ 'version ' => '4.26.83 ' ,
31
31
'autoload ' => 100000 , // in PW 3.0.114+ higher numbers are loaded first - we want Tracy first
32
32
'singular ' => true ,
33
33
'requires ' => 'ProcessWire>=2.7.2, PHP>=5.4.4 ' ,
@@ -1162,8 +1162,18 @@ public function init() {
1162
1162
$ adminerModuleId = $ this ->wire ('modules ' )->getModuleID ("ProcessTracyAdminer " );
1163
1163
$ adminerUrl = $ this ->wire ('pages ' )->get ("process= $ adminerModuleId " )->url ;
1164
1164
1165
+ ob_start ();
1166
+ \Tracy \Debugger::renderLoader ();
1167
+ $ tracy_loader = ob_get_clean ();
1168
+ $ event ->return = preg_replace (
1169
+ '/<head\b[^>]*>/i ' ,
1170
+ '$0 ' . "\n" . $ tracy_loader . "\n" ,
1171
+ $ event ->return
1172
+ );
1173
+
1165
1174
$ event ->return = str_replace ("</body> " , "<script>window.HttpRootUrl = ' " .$ this ->wire ('config ' )->urls ->httpRoot ."'; window.AdminerUrl = ' " .$ adminerUrl ."'; window.AdminerRendererUrl = ' " .$ adminerRendererUrl ."'; window.TracyMaxAjaxRows = " .$ this ->data ['maxAjaxRows ' ]."; window.TracyPanelZIndex = " . ($ this ->data ['panelZindex ' ] + 1 ) . ";</script></body> " , $ event ->return );
1166
1175
1176
+
1167
1177
$ tracyErrors = Debugger::getBar ()->getPanel ('Tracy:errors ' );
1168
1178
if (!is_array ($ tracyErrors ->data ) || count ($ tracyErrors ->data ) === 0 ) {
1169
1179
if (($ this ->data ['hideDebugBar ' ] && !$ this ->wire ('input ' )->cookie ->tracyShow ) || $ this ->wire ('input ' )->cookie ->tracyHidden == 1 ) {
0 commit comments