controllers: fix base url to omit scheme for when we connect through a https gateway
authorMichael Wallner <mike@php.net>
Fri, 16 Dec 2016 09:13:14 +0000 (10:13 +0100)
committerMichael Wallner <mike@php.net>
Fri, 20 Dec 2019 12:21:59 +0000 (13:21 +0100)
app/Controller/Github/Signin.php
app/Controller/Wikipage.php

index d753687a3b7928ed739bc4b0bc66dbc54dbbad8b..5f8b6a7709944527d477e9a75b0077796db97875 100644 (file)
@@ -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"))) {
index 3c07b6989f502cd55632775a7e1e424a23dd0333..1c896fd8048493092f2bcb8bdff61c322e3be6fc 100644 (file)
@@ -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();"
                                ]
                        ]);