UPD: Minor edits

This commit is contained in:
Tony Air 2024-04-22 15:02:31 +02:00
parent 473b406f8a
commit 630672e87e
5 changed files with 21 additions and 8 deletions

View File

@ -7,3 +7,16 @@ SS_DEFAULT_ADMIN_USERNAME=''
SS_DEFAULT_ADMIN_PASSWORD='' SS_DEFAULT_ADMIN_PASSWORD=''
SS_ENVIRONMENT_TYPE='dev' SS_ENVIRONMENT_TYPE='dev'
NOCAPTCHA_SITE_KEY=''
NOCAPTCHA_SECRET_KEY=''
TURNSTILE_SITE_KEY=''
TURNSTILE_SECRET_KEY=''
GOOGLEMAPS_API_KEY=''
MAPBOX_API_KEY=''
APP_SMTP_USERNAME=''
APP_SMTP_PASSWORD=''

View File

@ -1,5 +1,10 @@
<?php <?php
use SilverStripe\Core\EnvironmentLoader;
$env = BASE_PATH . '/app/.env';
$loader = new EnvironmentLoader();
$loader->loadFile($env);
/*\SilverStripe\Core\Config\Config::modify()->set( /*\SilverStripe\Core\Config\Config::modify()->set(
\SilverStripe\Control\Email\Email::class, \SilverStripe\Control\Email\Email::class,
'bcc_all_emails_to',//'cc_all_emails_to', 'bcc_all_emails_to',//'cc_all_emails_to',

View File

@ -10,11 +10,11 @@ A2nt\CMSNiceties\Templates\DeferredRequirements:
deferred: true deferred: true
noreact: true noreact: true
nojquery: true nojquery: true
jquery_version: '`JQUERY_VER`' jquery_version: '3.7.1'
fontawesome_svg: false fontawesome_svg: false
SilverStripe\FontAwesome\FontAwesomeField: SilverStripe\FontAwesome\FontAwesomeField:
version: '`FONTAWESOME_VER`' version: '6.5.1'
SilverStripe\View\Requirements: SilverStripe\View\Requirements:
disable_flush_combined: true disable_flush_combined: true

View File

@ -19,6 +19,3 @@ MAPBOX_API_KEY=''
APP_SMTP_USERNAME='' APP_SMTP_USERNAME=''
APP_SMTP_PASSWORD='' APP_SMTP_PASSWORD=''
FONTAWESOME_VER='6.5.1'
JQUERY_VER='3.4.1'

View File

@ -3,7 +3,6 @@
use SilverStripe\Control\HTTPApplication; use SilverStripe\Control\HTTPApplication;
use SilverStripe\Control\HTTPRequestBuilder; use SilverStripe\Control\HTTPRequestBuilder;
use SilverStripe\Core\CoreKernel; use SilverStripe\Core\CoreKernel;
use SilverStripe\Core\Startup\ErrorControlChainMiddleware;
// Find autoload.php // Find autoload.php
if (file_exists(__DIR__ . '/../vendor/autoload.php')) { if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
@ -22,6 +21,5 @@ $request = HTTPRequestBuilder::createFromEnvironment();
// Default application // Default application
$kernel = new CoreKernel(BASE_PATH); $kernel = new CoreKernel(BASE_PATH);
$app = new HTTPApplication($kernel); $app = new HTTPApplication($kernel);
$app->addMiddleware(new ErrorControlChainMiddleware($app));
$response = $app->handle($request); $response = $app->handle($request);
$response->output(); $response->output();