diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-07-11 12:58:58 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-07-11 14:20:09 -0100 |
commit | a7f7c0368d8cda62bc3e587e1bc00b277f525d2c (patch) | |
tree | 39a797c501b68b472b474fe3691554e51414ad22 /lib/Controller | |
parent | b3e1c5a50c559116985001d4e799f88b29f0720b (diff) |
rewrite of the url/host config
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Controller')
-rw-r--r-- | lib/Controller/ConfigController.php | 2 | ||||
-rw-r--r-- | lib/Controller/NavigationController.php | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/Controller/ConfigController.php b/lib/Controller/ConfigController.php index 3059ec14..7a47d700 100644 --- a/lib/Controller/ConfigController.php +++ b/lib/Controller/ConfigController.php @@ -47,7 +47,7 @@ class ConfigController extends Controller { * @return DataResponse */ public function setCloudAddress(string $cloudAddress): DataResponse { - $this->configService->setCloudAddress($cloudAddress); + $this->configService->setCloudUrl($cloudAddress); return new DataResponse([]); } diff --git a/lib/Controller/NavigationController.php b/lib/Controller/NavigationController.php index ae2418d5..1bb8a941 100644 --- a/lib/Controller/NavigationController.php +++ b/lib/Controller/NavigationController.php @@ -145,7 +145,7 @@ class NavigationController extends Controller { ]; try { - $data['serverData']['cloudAddress'] = $this->configService->getCloudAddress(); + $data['serverData']['cloudAddress'] = $this->configService->getCloudUrl(); } catch (SocialAppConfigException $e) { $this->checkService->checkInstallationStatus(); $cloudAddress = $this->setupCloudAddress(); @@ -157,7 +157,7 @@ class NavigationController extends Controller { if ($data['serverData']['isAdmin']) { $cloudAddress = $this->request->getParam('cloudAddress'); if ($cloudAddress !== null) { - $this->configService->setCloudAddress($cloudAddress); + $this->configService->setCloudUrl($cloudAddress); } else { return new TemplateResponse(Application::APP_NAME, 'main', $data); } @@ -188,16 +188,16 @@ class NavigationController extends Controller { } private function setupCloudAddress(): string { -// $frontControllerActive = -// ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true -// || getenv('front_controller_active') === 'true'); + $frontControllerActive = + ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true + || getenv('front_controller_active') === 'true'); $cloudAddress = rtrim($this->config->getSystemValue('overwrite.cli.url', ''), '/'); if ($cloudAddress !== '') { -// if (!$frontControllerActive) { -// $cloudAddress .= '/index.php'; -// } - $this->configService->setCloudAddress($cloudAddress); + if (!$frontControllerActive) { + $cloudAddress .= '/index.php'; + } + $this->configService->setCloudUrl($cloudAddress); return $cloudAddress; } @@ -229,7 +229,7 @@ class NavigationController extends Controller { $setup = false; try { - $this->configService->getCloudAddress(true); + $this->configService->getCloudUrl(); $setup = true; } catch (SocialAppConfigException $e) { } |