From 1cc5e4310628473461678ef449a2ca8e9441bf76 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Wed, 18 Jan 2017 10:08:18 +0100 Subject: [PATCH] set the correct language tag expected by JS (cherry picked from commit b565415e1c223afd690ce62aa9604aabe86b31a2) Signed-off-by: Andras Timar --- lib/Controller/DocumentController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Controller/DocumentController.php b/lib/Controller/DocumentController.php index 4fde3599..913b1159 100644 --- a/lib/Controller/DocumentController.php +++ b/lib/Controller/DocumentController.php @@ -231,12 +231,13 @@ class DocumentController extends Controller { if ($content && $view->file_put_contents($path, $content)) { $info = $view->getFileInfo($path); $ret = $this->wopiParser->getUrlSrc($mimetype); + $lolang = strtolower(str_replace('_', '-', $this->settings->getUserValue($this->uid, 'core', 'lang', 'en'))); $response = array( 'status' => 'success', 'fileid' => $info['fileid'], 'urlsrc' => $ret['urlsrc'], 'action' => $ret['action'], - 'lolang' => $this->settings->getUserValue($this->uid, 'core', 'lang', 'en'), + 'lolang' => $lolang, 'data' => \OCA\Files\Helper::formatFileInfo($info) ); } else {