X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fweb.ex;h=cf3ac1287b364bf9552cc970bf47da6eead76b7d;hb=0590d16089e4ffd52ac3e446f44aefd3f90dc38a;hp=853aa2a87f8d63febb13036e11f00477fbef7f1a;hpb=ac72b578da673282b927b945bfe03cd3012444b6;p=akkoma
diff --git a/lib/pleroma/web/web.ex b/lib/pleroma/web/web.ex
index 853aa2a87..cf3ac1287 100644
--- a/lib/pleroma/web/web.ex
+++ b/lib/pleroma/web/web.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web do
@@ -23,9 +23,17 @@ defmodule Pleroma.Web do
def controller do
quote do
use Phoenix.Controller, namespace: Pleroma.Web
+
import Plug.Conn
import Pleroma.Web.Gettext
import Pleroma.Web.Router.Helpers
+ import Pleroma.Web.TranslationHelpers
+
+ plug(:set_put_layout)
+
+ defp set_put_layout(conn, _) do
+ put_layout(conn, Pleroma.Config.get(:app_layout, "app.html"))
+ end
end
end
@@ -50,10 +58,10 @@ defmodule Pleroma.Web do
rescue
error ->
Logger.error(
- "#{__MODULE__} failed to render #{inspect({view, template})}: #{inspect(error)}"
+ "#{__MODULE__} failed to render #{inspect({view, template})}\n" <>
+ Exception.format(:error, error, __STACKTRACE__)
)
- Logger.error(inspect(__STACKTRACE__))
nil
end