diff --git a/index.php b/index.php index d4ccd194ba9ab2a489603eedb54f650268bd96be..3838be68a2d15f427db9351c85dcdbb2444c9c62 100644 --- a/index.php +++ b/index.php @@ -28,24 +28,15 @@ if ($conf['debug']) { if (isset($_GET['q']) && $_GET['q'] === 'logs') { Logging::init(); exit(0); - } else { - $conf['logfile'] = Logging::createLogFile($_GET['q']); - //error_reporting(E_ALL); } -} else { - error_reporting(E_ERROR); + + $conf['logfile'] = Logging::createLogFile($_GET['q']); } -include_once('classes/HTTPStatus.php'); -include_once('classes/Utils.php'); -include_once('classes/Queries.php'); -include_once('classes/Endpoint.php'); -include_once('classes/Convert.php'); $results = array(); $firstResults = array(); $endpoints = array(); $endpoints['local'] = new Endpoint($conf['endpoint']['local'], $conf['endpointParams']['config']); - $acceptContentType = Utils::getBestContentType($_SERVER['HTTP_ACCEPT'], $conf['http_accept']); $extension = Utils::getExtension($acceptContentType, $conf['http_accept']); $uri = $conf['basedir'] . $_GET['q']; @@ -57,7 +48,6 @@ if ($acceptContentType === null) { if ($conf['export'] && $_GET['q'] === 'export') { include_once('settings.inc.php'); - include_once('classes/Exporter.php'); $exp = new Exporter(); header('Content-Type: text/plain'); $exp->run(); @@ -74,7 +64,7 @@ if ($uri === $conf['basedir']) { // Configure external URIs if necessary. $localUri = $conf['basedir'] . $_GET['q']; - +$foo = $_SERVER['HTTP_HOST']; $uri = Utils::getMirroredUri($localUri); // Load Loadspeakr modules.