From 5c306088847711ba5b9a971e7a58118d1190ee22 Mon Sep 17 00:00:00 2001 From: Stein Magne Bjorklund <steinmb@smbjorklund.com> Date: Wed, 15 Sep 2021 15:33:51 +0200 Subject: [PATCH] Replace <tt> HTML element - HTML element deprecated should no longer be used. - Generic reformatting. --- index.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index b90dcaba..ab0e948f 100644 --- a/index.php +++ b/index.php @@ -84,23 +84,28 @@ $localUri = $conf['basedir'].$_GET['q']; $uri = Utils::getMirroredUri($localUri); -//Modules -foreach($conf['modules']['available'] as $i){ - $className = $i.'Module'; - $currentModule = $conf['modules']['directory'].$className.'.php'; - if(!is_file($currentModule)){ - HTTPStatus::send500("<br/>Can't load or error in module <tt>".$currentModule."</tt>" ); +//Load Loadspeakr modules. +foreach($conf['modules']['available'] as $i) { + $className = $i . 'Module'; + $currentModule = $conf['modules']['directory'] . $className . '.php'; + + if (!is_file($currentModule)) { + HTTPStatus::send500('<br/>Can\'t load or error in module <pre>' . $currentModule . '</pre>' ); exit(1); } + require_once($currentModule); $module = new $className(); $matching = $module->match($uri); - if($matching != FALSE){ + + if ($matching != FALSE) { $module->execute($matching); - if($conf['logfile'] != null){ + + if ($conf['logfile'] != null) { fwrite($conf['logfile'], "]}"); fclose($conf['logfile']); } + exit(0); } } -- GitLab