diff options
author | Thomas Lange <code@nerdmind.de> | 2021-06-17 15:28:30 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-06-17 15:28:30 +0200 |
commit | 1bc0e9f154138354864d243aa559854c5e5eb71c (patch) | |
tree | b190307803010a41100e071e1e731873be148bcb /core/application.php | |
parent | 1c03652fa244d76ac15760b33a36711b23a3ef22 (diff) | |
download | blog-1bc0e9f154138354864d243aa559854c5e5eb71c.tar.gz blog-1bc0e9f154138354864d243aa559854c5e5eb71c.tar.xz blog-1bc0e9f154138354864d243aa559854c5e5eb71c.zip |
Pass configuration array directly to foreach
Diffstat (limited to 'core/application.php')
-rw-r--r-- | core/application.php | 11 |
1 files 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); } |