From ec3dc57cb53d76c02cdbf43cbd6b18e6a72d877f Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Sun, 16 Dec 2018 01:35:51 +0100 Subject: [PATCH] Revert "Update settings loading" This reverts commit b375f058c314cdf231a7e1569ddb88a200c273b9. --- MapsRegistration.php | 6 +----- Maps_Settings.php | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 7 deletions(-) mode change 100644 => 100755 Maps_Settings.php diff --git a/MapsRegistration.php b/MapsRegistration.php index de50742f4..68d0ea05b 100644 --- a/MapsRegistration.php +++ b/MapsRegistration.php @@ -11,11 +11,7 @@ public static function onRegistration( array $credits ) { } if ( !defined( 'Maps_SETTINGS_LOADED' ) ) { - foreach ( include __DIR__ . '/DefaultSettings.php' as $key => $value ) { - $GLOBALS[$key] = $value; - } - - define( 'Maps_SETTINGS_LOADED', true ); + require_once __DIR__ . '/Maps_Settings.php'; } if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) { diff --git a/Maps_Settings.php b/Maps_Settings.php old mode 100644 new mode 100755 index 5150ec280..0d56a3025 --- a/Maps_Settings.php +++ b/Maps_Settings.php @@ -1,4 +1,17 @@ $value ) { + $GLOBALS[$key] = $value; +} + +if ( !defined( 'Maps_SETTINGS_LOADED' ) ) { + define( 'Maps_SETTINGS_LOADED', true ); +}