Skip to content

Commit

Permalink
Only check for debugkit connection if the plugin is installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 8, 2021
1 parent 699df38 commit a8263fc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions templates/Pages/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,17 @@
<ul>
<?php if (Plugin::isLoaded('DebugKit')) : ?>
<li class="bullet success">DebugKit is loaded.</li>
<?php
$result = $checkConnection('debug_kit');
?>
<?php if ($result['connected']) : ?>
<li class="bullet success">DebugKit can connect to the database.</li>
<?php else : ?>
<li class="bullet problem">DebugKit is <strong>not</strong> able to connect to the database.<br /><?= $result['error'] ?></li>
<?php endif; ?>
<?php else : ?>
<li class="bullet problem">DebugKit is <strong>not</strong> loaded.</li>
<?php endif; ?>
<?php
$result = $checkConnection('debug_kit');
?>
<?php if ($result['connected']) : ?>
<li class="bullet success">DebugKit can connect to the database.</li>
<?php else : ?>
<li class="bullet problem">DebugKit is <strong>not</strong> able to connect to the database.<br /><?= $result['error'] ?></li>
<?php endif; ?>
</ul>
</div>
</div>
Expand Down

0 comments on commit a8263fc

Please sign in to comment.