From 1bc0e9f154138354864d243aa559854c5e5eb71c Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 17 Jun 2021 15:28:30 +0200 Subject: Pass configuration array directly to foreach --- core/application.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/application.php b/core/application.php index 38025b8..a84669f 100644 --- a/core/application.php +++ b/core/application.php @@ -34,9 +34,9 @@ set_exception_handler(function(Throwable $Exception) { HTTP::init($_GET, $_POST, $_FILES, TRUE); #=============================================================================== -# Default configuration (can be overridden in configuration.php) +# Set default configuration #=============================================================================== -$configuration = [ +foreach([ 'CORE.LANGUAGE' => 'en', 'CORE.SEND_304' => FALSE, 'BLOGMETA.NAME' => 'Example blog', @@ -82,12 +82,7 @@ $configuration = [ 'POST.FEED_SORT' => 'time_insert DESC', 'PAGE.FEED_GUID' => ['id', 'time_insert'], 'POST.FEED_GUID' => ['id', 'time_insert'] -]; - -#=============================================================================== -# Set default configuration -#=============================================================================== -foreach($configuration as $name => $value) { +] as $name => $value) { Application::set($name, $value); } -- cgit v1.2.3