From cc3c8d1db79c446da3bc071ff8b2a12b22ee2325 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Fri, 17 Jun 2016 13:05:03 +0100 Subject: [PATCH] parse left and right footers as json --- settings.coffee | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/settings.coffee b/settings.coffee index e813342ebd..9e81e644a1 100644 --- a/settings.coffee +++ b/settings.coffee @@ -410,15 +410,22 @@ settings = #### OPTIONAL CONFIGERABLE SETTINGS - if process.env["SHARELATEX_LEFT_FOOTER"]? - settings.left_footer = process.env["SHARELATEX_LEFT_FOOTER"] + try + settings.nav.left_footer = JSON.parse(process.env["SHARELATEX_LEFT_FOOTER"]) + catch e + console.error("could not parse SHARELATEX_LEFT_FOOTER, not valid JSON") if process.env["SHARELATEX_RIGHT_FOOTER"]? - settings.right_footer = process.env["SHARELATEX_RIGHT_FOOTER"] + settings.nav.right_footer = process.env["SHARELATEX_RIGHT_FOOTER"] + try + settings.nav.right_footer = JSON.parse(process.env["SHARELATEX_RIGHT_FOOTER"]) + catch e + console.error("could not parse SHARELATEX_RIGHT_FOOTER, not valid JSON") + if process.env["SHARELATEX_HEADER"]? - settings.header = process.env["SHARELATEX_HEADER"] + settings.nav.header = process.env["SHARELATEX_HEADER"] # Sending Email