From: Michael Wallner Date: Fri, 16 Dec 2016 09:13:14 +0000 (+0100) Subject: controllers: fix base url to omit scheme for when we connect through a https gateway X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=8b9e6a11bae0db302dd100ce288b07ef7995e372;p=pharext%2Fpharext.org controllers: fix base url to omit scheme for when we connect through a https gateway --- diff --git a/app/Controller/Github/Signin.php b/app/Controller/Github/Signin.php index d753687..5f8b6a7 100644 --- a/app/Controller/Github/Signin.php +++ b/app/Controller/Github/Signin.php @@ -38,13 +38,13 @@ class Signin extends Github if (($returnto = $this->app->getRequest()->getQuery("returnto"))) { $this->app->redirect($returnto); } else { - $this->app->redirect($this->app->getBaseUrl()->mod("./github")); + $this->app->redirect($this->app->getBaseUrl()->mod(":./github")); } return; } } } - $callback = $this->app->getBaseUrl()->mod("./github/callback"); + $callback = $this->app->getBaseUrl()->mod(":./github/callback"); $location = $this->github->getAuthUrl($callback); $this->app->redirect($location); if (($returnto = $this->app->getRequest()->getQuery("returnto"))) { diff --git a/app/Controller/Wikipage.php b/app/Controller/Wikipage.php index 3c07b69..1c896fd 100644 --- a/app/Controller/Wikipage.php +++ b/app/Controller/Wikipage.php @@ -23,9 +23,9 @@ class Wikipage implements Controller if ($title === "Packager hook") { $baseUrl = $this->app->getBaseUrl(); $this->app->getView()->addData([ - "styles" => [$baseUrl->mod("./highlight/styles/dark.css")], + "styles" => [$baseUrl->mod(":./highlight/styles/dark.css")], "scripts" => [ - $baseUrl->mod("./highlight/highlight.pack.js"), + $baseUrl->mod(":./highlight/highlight.pack.js"), "hljs.initHighlightingOnLoad();" ] ]);