set the correct language tag expected by JS

(cherry picked from commit b565415e1c)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
pull/61/head
Andras Timar 7 years ago
parent f74b0b3018
commit 1cc5e43106

@ -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 {

Loading…
Cancel
Save