@@ -27,7 +27,7 @@ public static function getModuleInfo() {
2727 'summary ' => __ ('Tracy debugger from Nette with many PW specific custom tools. ' , __FILE__ ),
2828 'author ' => 'Adrian Jones ' ,
2929 'href ' => 'https://processwire.com/talk/forum/58-tracy-debugger/ ' ,
30- 'version ' => '4.26.82 ' ,
30+ 'version ' => '4.26.83 ' ,
3131 'autoload ' => 100000 , // in PW 3.0.114+ higher numbers are loaded first - we want Tracy first
3232 'singular ' => true ,
3333 'requires ' => 'ProcessWire>=2.7.2, PHP>=5.4.4 ' ,
@@ -1162,8 +1162,18 @@ public function init() {
11621162 $ adminerModuleId = $ this ->wire ('modules ' )->getModuleID ("ProcessTracyAdminer " );
11631163 $ adminerUrl = $ this ->wire ('pages ' )->get ("process= $ adminerModuleId " )->url ;
11641164
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+
11651174 $ 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 );
11661175
1176+
11671177 $ tracyErrors = Debugger::getBar ()->getPanel ('Tracy:errors ' );
11681178 if (!is_array ($ tracyErrors ->data ) || count ($ tracyErrors ->data ) === 0 ) {
11691179 if (($ this ->data ['hideDebugBar ' ] && !$ this ->wire ('input ' )->cookie ->tracyShow ) || $ this ->wire ('input ' )->cookie ->tracyHidden == 1 ) {
0 commit comments