wsd/LOOLWSD.cpp | 6 +++--- wsd/LOOLWSD.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit c2a6f15426321d087c897e9fcc047b3cd945eb57 Author: Jan Holesovsky <ke...@collabora.com> Date: Mon Jul 17 19:59:46 2017 +0200 discovery: Make the unknown file extensions read-only. Change-Id: Ie1467334868a7e4aa31aa69f67d0cd434ed18e7b Reviewed-on: https://gerrit.libreoffice.org/40081 Reviewed-by: pranavk <pran...@collabora.co.uk> Tested-by: pranavk <pran...@collabora.co.uk> diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 5e3ce0e4..b5003a5c 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -546,7 +546,7 @@ std::string LOOLWSD::LOKitVersion; std::string LOOLWSD::ConfigFile = LOOLWSD_CONFIGDIR "/loolwsd.xml"; Util::RuntimeConstant<bool> LOOLWSD::SSLEnabled; Util::RuntimeConstant<bool> LOOLWSD::SSLTermination; -std::set<std::string> LOOLWSD::ViewFileExtensions; +std::set<std::string> LOOLWSD::EditFileExtensions; static std::string UnitTestLibrary; @@ -2169,8 +2169,8 @@ private: elem->setAttribute(urlsrc, uriValue); // Set the View extensions cache as well. - if (elem->getAttribute("name") == "view") - LOOLWSD::ViewFileExtensions.insert(elem->getAttribute("ext")); + if (elem->getAttribute("name") == "edit") + LOOLWSD::EditFileExtensions.insert(elem->getAttribute("ext")); } std::ostringstream ostrXML; diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp index a608c6c1..f9c3d409 100644 --- a/wsd/LOOLWSD.hpp +++ b/wsd/LOOLWSD.hpp @@ -55,7 +55,7 @@ public: static std::atomic<unsigned> NumConnections; static bool TileCachePersistent; static std::unique_ptr<TraceFileWriter> TraceDumper; - static std::set<std::string> ViewFileExtensions; + static std::set<std::string> EditFileExtensions; /// Flag to shutdown the server. std::atomic<bool> ShutdownFlag; @@ -85,7 +85,7 @@ public: /// Return truee iff extension is marked as view action in discovery.xml. static bool IsViewFileExtension(const std::string& extension) { - return ViewFileExtensions.find(extension) != ViewFileExtensions.end(); + return EditFileExtensions.find(extension) == EditFileExtensions.end(); } /// Returns the value of the specified application configuration, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits