diff --git a/js/documents.js b/js/documents.js index 3c44b34b..d902d182 100644 --- a/js/documents.js +++ b/js/documents.js @@ -129,7 +129,7 @@ var documentsMain = { var urlsrc = documentsMain.urlsrc + "WOPISrc=" + wopisrc + "&title=" + encodeURIComponent(title) + - "&lang=" + OC.getLocale() + + "&lang=" + OC.getLocale().replace('_', '-') + // loleaflet expects a BCP47 language tag syntax "&permission=readonly"; // access_token - must be passed via a form post @@ -320,7 +320,7 @@ var documentsMain = { var urlsrc = documentsMain.urlsrc + "WOPISrc=" + wopisrc + "&title=" + encodeURIComponent(title) + - "&lang=" + OC.getLocale() + + "&lang=" + OC.getLocale().replace('_', '-') + // loleaflet expects a BCP47 language tag syntax "&closebutton=1" + "&revisionhistory=1"; if (!documentsMain.canEdit || action === "view") { diff --git a/lib/Controller/DocumentController.php b/lib/Controller/DocumentController.php index c2eb7621..72c5bafd 100644 --- a/lib/Controller/DocumentController.php +++ b/lib/Controller/DocumentController.php @@ -233,13 +233,8 @@ 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'] . '_' . $this->settings->getSystemValue('instanceid'), - 'urlsrc' => $ret['urlsrc'], - 'action' => $ret['action'], - 'lolang' => $lolang, 'data' => \OCA\Files\Helper::formatFileInfo($info) ); } else {