diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2020-04-16 00:59:43 +0300 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2020-04-16 11:37:08 +0200 |
commit | aaf1fa4fc610323fd539d1480ef057e123f98790 (patch) | |
tree | d65bb00be9c4ed1e387eeeaa44a5c91dcc46cd76 /wsd/FileServer.cpp | |
parent | Welcome: Add ./configure of the welcome message default. (diff) | |
download | online-aaf1fa4fc610323fd539d1480ef057e123f98790.tar.gz online-aaf1fa4fc610323fd539d1480ef057e123f98790.zip |
Welcome: Pass welcome value from loolwsd.xml to the JS side
Now we have window.enableWelcomeMessage on the JS side to avoid any
queries at all when the feature is disabled.
Change-Id: I8420089f775bfbf5bcd557c7c720172fbce8c22e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92338
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'wsd/FileServer.cpp')
-rw-r--r-- | wsd/FileServer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp index 027655dc9c..5a973bc01e 100644 --- a/wsd/FileServer.cpp +++ b/wsd/FileServer.cpp @@ -736,6 +736,11 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco:: const std::string idleTimeoutSecs= config.getString("per_view.idle_timeout_secs", "900"); Poco::replaceInPlace(preprocess, std::string("%IDLE_TIMEOUT_SECS%"), idleTimeoutSecs); + std::string enableWelcomeMessage = "false"; + if (config.getBool("welcome.enable", false)) + enableWelcomeMessage = "true"; + Poco::replaceInPlace(preprocess, std::string("%ENABLE_WELCOME_MSG%"), enableWelcomeMessage); + // Capture cookies so we can optionally reuse them for the storage requests. { NameValueCollection cookies; |