mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Move debugbar code to separate file
This commit is contained in:
parent
d582120fac
commit
8974830621
22
admin/includes/debugbar.php
Normal file
22
admin/includes/debugbar.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$hooks->register('debugbar_admin_head_end', HOOK_ADMIN_HEAD_END, function ($params) {
|
||||||
|
global $debugBar;
|
||||||
|
|
||||||
|
if (!isset($debugBar)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$debugBarRenderer = $debugBar->getJavascriptRenderer();
|
||||||
|
echo $debugBarRenderer->renderHead();
|
||||||
|
});
|
||||||
|
$hooks->register('debugbar_admin_body_end', HOOK_ADMIN_BODY_END, function ($params) {
|
||||||
|
global $debugBar;
|
||||||
|
|
||||||
|
if (!isset($debugBar)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$debugBarRenderer = $debugBar->getJavascriptRenderer();
|
||||||
|
echo $debugBarRenderer->render();
|
||||||
|
});
|
@ -30,26 +30,7 @@ if(!$db->hasTable('myaac_account_actions')) {
|
|||||||
throw new RuntimeException('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.');
|
throw new RuntimeException('Seems that the table <strong>myaac_account_actions</strong> of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting <a href="' . BASE_URL . 'install">this</a> url.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$hooks->register('debugbar_admin_head_end', HOOK_ADMIN_HEAD_END, function ($params) {
|
require __DIR__ . '/includes/debugbar.php';
|
||||||
global $debugBar;
|
|
||||||
|
|
||||||
if (!isset($debugBar)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$debugBarRenderer = $debugBar->getJavascriptRenderer();
|
|
||||||
echo $debugBarRenderer->renderHead();
|
|
||||||
});
|
|
||||||
$hooks->register('debugbar_admin_body_end', HOOK_ADMIN_BODY_END, function ($params) {
|
|
||||||
global $debugBar;
|
|
||||||
|
|
||||||
if (!isset($debugBar)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$debugBarRenderer = $debugBar->getJavascriptRenderer();
|
|
||||||
echo $debugBarRenderer->render();
|
|
||||||
});
|
|
||||||
|
|
||||||
require SYSTEM . 'status.php';
|
require SYSTEM . 'status.php';
|
||||||
require SYSTEM . 'login.php';
|
require SYSTEM . 'login.php';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user