From 80b4c9a6a6c9e844a5c187471c595f334346b6b3 Mon Sep 17 00:00:00 2001 From: Xavier Rousset Date: Wed, 14 Aug 2019 15:45:04 +0200 Subject: [PATCH] PHRAS-2127 | Add https in default geoname server url, remove url formatter in register controller --- lib/Alchemy/Phrasea/Application.php | 2 +- lib/Alchemy/Phrasea/Controller/Root/LoginController.php | 2 +- .../Phrasea/Core/Configuration/RegistryFormManipulator.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index f586a4f93a..743f9cc664 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -653,7 +653,7 @@ class Application extends SilexApplication private function setupGeonames() { $this['geonames.server-uri'] = $this->share(function (Application $app) { - return $app['conf']->get(['registry', 'webservices', 'geonames-server'], 'http://geonames.alchemyasp.com/'); + return $app['conf']->get(['registry', 'webservices', 'geonames-server'], 'https://geonames.alchemyasp.com/'); }); } diff --git a/lib/Alchemy/Phrasea/Controller/Root/LoginController.php b/lib/Alchemy/Phrasea/Controller/Root/LoginController.php index ecb65abc47..c0a05be25f 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/LoginController.php +++ b/lib/Alchemy/Phrasea/Controller/Root/LoginController.php @@ -265,7 +265,7 @@ class LoginController extends Controller return $this->render('login/register-classic.html.twig', array_merge( $this->getDefaultTemplateVariables($request), [ - 'geonames_server_uri' => str_replace(sprintf('%s:', parse_url($url, PHP_URL_SCHEME)), '', $url), + 'geonames_server_uri' => $url, 'form' => $form->createView() ])); } diff --git a/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php b/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php index fbf4526d05..fbce72ccc7 100644 --- a/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php +++ b/lib/Alchemy/Phrasea/Core/Configuration/RegistryFormManipulator.php @@ -146,7 +146,7 @@ class RegistryFormManipulator ], 'webservices' => [ 'google-charts-enabled' => true, - 'geonames-server' => 'http://geonames.alchemyasp.com/', + 'geonames-server' => 'https://geonames.alchemyasp.com/', 'captchas-enabled' => false, 'recaptcha-public-key' => '', 'recaptcha-private-key' => '',