refactor: replace require with require_once, remove unneeded semicolon

This commit is contained in:
recanman 2024-10-05 00:00:17 -07:00
parent 2b3667e557
commit c6a402927d
2 changed files with 3 additions and 3 deletions

View file

@ -20,7 +20,7 @@ $api_cg = json_decode(file_get_contents('coingecko.json'), true);
// Configuration file // Configuration file
$config = []; $config = [];
if (file_exists('config.php')) { if (file_exists('config.php')) {
$config = require 'config.php'; $config = require_once 'config.php';
} }
$display_servers_guru = isset($config['servers_guru']) && $config['servers_guru'] === true; $display_servers_guru = isset($config['servers_guru']) && $config['servers_guru'] === true;
@ -106,5 +106,5 @@ foreach (array_reverse($preferred_currencies) as $currency) {
} }
// Output the HTML // Output the HTML
require 'templates/index.php'; require_once 'templates/index.php';
?> ?>

View file

@ -121,7 +121,7 @@
<?php echo $info; <?php echo $info;
if ($display_servers_guru) { if ($display_servers_guru) {
echo $servers_guru; echo $servers_guru;
}; }
echo $attribution; ?> echo $attribution; ?>
</small> </small>
<hr /> <hr />