From 6e356cbd35d08a07914949803b6a2a2a47a144b5 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 23 Mar 2018 13:27:38 +0300 Subject: [PATCH 01/33] Removing case sensitivity in extension --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index bf817761..7c97ae34 100644 --- a/js/main.js +++ b/js/main.js @@ -230,7 +230,7 @@ var initPage = function(){ if ($("#isPublic").val() && !$("#dir").val().length) { var fileName = $("#filename").val(); - var extension = fileName.substr(fileName.lastIndexOf(".") + 1); + var extension = fileName.substr(fileName.lastIndexOf(".") + 1).toLowerCase(); var initSharedButton = function() { var mimes = OCA.Onlyoffice.setting.formats; From a0fcb222c914b2bc08b2e768783f10d4e6dc623c Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 23 Mar 2018 13:49:57 +0300 Subject: [PATCH 02/33] change logging --- controller/callbackcontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 284e7d8a..3e69ffd7 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -347,7 +347,6 @@ public function track($doc, $users, $key, $status, $url) { $userId = $users[0]; $user = $this->userManager->get($userId); if (!empty($user)) { - $this->logger->info("setupFS " . $userId, array("app" => $this->appName)); \OC_Util::tearDownFS(); \OC_Util::setupFS($userId); @@ -375,6 +374,7 @@ public function track($doc, $users, $key, $status, $url) { $key = DocumentService::GenerateRevisionId($fileId . $url); try { + $this->logger->debug("GetConvertedUri from " . $downloadExt . " to " . $curExt . " " . $url, array("app" => $this->appName)); $url = $documentService->GetConvertedUri($url, $downloadExt, $curExt, $key); } catch (\Exception $e) { $this->logger->error("GetConvertedUri on save error: " . $e->getMessage(), array("app" => $this->appName)); From aff1cd5629a47cd66a07b3424c8d8218e59037d5 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 23 Mar 2018 14:01:35 +0300 Subject: [PATCH 03/33] convert txt with internal ds url --- controller/callbackcontroller.php | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 3e69ffd7..ec677508 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -365,6 +365,22 @@ public function track($doc, $users, $key, $status, $url) { return $error; } + $documentServerUrl = $this->config->GetDocumentServerInternalUrl(true); + if (!empty($documentServerUrl)) { + $from = $this->config->GetDocumentServerUrl(); + + if (!preg_match("/^https?:\/\//i", $from)) { + $parsedUrl = parse_url($url); + $from = $parsedUrl["scheme"] . "://" . $parsedUrl["host"] . (array_key_exists("port", $parsedUrl) ? (":" . $parsedUrl["port"]) : "") . $from; + } + + if ($from !== $documentServerUrl) + { + $this->logger->debug("Replace in track from " . $from . " to " . $documentServerUrl, array("app" => $this->appName)); + $url = str_replace($from, $documentServerUrl, $url); + } + } + $fileName = $file->getName(); $curExt = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); $downloadExt = strtolower(pathinfo($url, PATHINFO_EXTENSION)); @@ -382,22 +398,6 @@ public function track($doc, $users, $key, $status, $url) { } } - $documentServerUrl = $this->config->GetDocumentServerInternalUrl(true); - if (!empty($documentServerUrl)) { - $from = $this->config->GetDocumentServerUrl(); - - if (!preg_match("/^https?:\/\//i", $from)) { - $parsedUrl = parse_url($url); - $from = $parsedUrl["scheme"] . "://" . $parsedUrl["host"] . (array_key_exists("port", $parsedUrl) ? (":" . $parsedUrl["port"]) : "") . $from; - } - - if ($from !== $documentServerUrl) - { - $this->logger->debug("Replace in track from " . $from . " to " . $documentServerUrl, array("app" => $this->appName)); - $url = str_replace($from, $documentServerUrl, $url); - } - } - if (($newData = $documentService->Request($url))) { $file->putContent($newData); $error = 0; From 530b2aa1906a214f15c1cb973fa7debc2a96f702 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 26 Mar 2018 14:28:12 +0300 Subject: [PATCH 04/33] known issues --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dad3e270..09fafdde 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ The app will create an item in the `new` (+) menu to create **Document**, **Spre You can also use our **[Docker installation](https://github.com/ONLYOFFICE/docker-onlyoffice-owncloud)** to get installed and configured Document Server and ownCloud installation with a couple of commands. + + ## Installing ONLYOFFICE Document Server You will need an instance of ONLYOFFICE Document Server that is resolvable and connectable both from ownCloud/Nextcloud and any end clients (version 4.2.7 and later are supported for use with the app). If that is not the case, use the official ONLYOFFICE Document Server documentation page: [Document Server for Linux](http://helpcenter.onlyoffice.com/server/linux/document/linux-installation.aspx). ONLYOFFICE Document Server must also be able to POST to ownCloud/Nextcloud directly. @@ -69,7 +71,7 @@ The **Open in ONLYOFFICE** action will be added to the file context menu. You ca The ONLYOFFICE integration follows the API documented here https://api.onlyoffice.com/editors/basic: -* When creating a new file, the user navigates to a document folder within ownCloud/Nextcloud and clicks the **Document**, **Spreadsheet** or **Presentation* item in the _new_ (+) menu. +* When creating a new file, the user navigates to a document folder within ownCloud/Nextcloud and clicks the **Document**, **Spreadsheet** or **Presentation** item in the _new_ (+) menu. * The browser invokes the `create` method in the `/lib/Controller/EditorController.php` controller. This method adds the copy of the file from the assets folder to the folder the user is currently in. @@ -100,3 +102,11 @@ The ONLYOFFICE integration follows the API documented here https://api.onlyoffic * After 10 seconds of inactivity, ONLYOFFICE Document Server sends a POST to the _callback_ URL letting ownCloud/Nextcloud know that the clients have finished editing the document and closed it. * ownCloud/Nextcloud downloads the new version of the document, replacing the old one. + + + +## Known issues + +If the document is shared using the **Federated Cloud Sharing** app, the co-editing among the servers will not be avaialble. The users from one and the same server can edit the document in the co-editing mode, but the users from two (or more) different servers will not be able to collaborate on the same document in real time. + +Adding the storage using the **External storages** app has issues with the co-editing in some cases. If the connection is made using the same authorization keys (the _Username and password_ or _Global credentials_ authentication type is selected), then the co-editing is available for the users. If different authorization keys are used (_Log-in credentials, save in database_ or _User entered, store in database_ authentication options), the co-editing is not available. When the _Log-in credentials, save in session_ authentication type is used, the files cannot be opened in the editor. From e25a8684d2013cbd62d96effbee6fbe0174cf938 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 26 Mar 2018 16:14:13 +0300 Subject: [PATCH 05/33] old link without token --- controller/callbackcontroller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index ec677508..2280697a 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -204,7 +204,7 @@ public function download($doc) { $userId = $hashData->userId; - $token = $hashData->token; + $token = isset($hashData->token) ? $hashData->token : NULL; list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token); if (isset($error)) { @@ -358,7 +358,7 @@ public function track($doc, $users, $key, $status, $url) { \OC_Util::setupFS($ownerId); } - $token = $hashData->token; + $token = isset($hashData->token) ? $hashData->token : NULL; list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token); if (isset($error)) { From 7121749f7bb9be3ee83d7346865bc7a673698ac7 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 27 Mar 2018 15:23:10 +0300 Subject: [PATCH 06/33] de_DE --- l10n/de.js | 14 +++++++------- l10n/de.json | 14 +++++++------- l10n/de_DE.js | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ l10n/de_DE.json | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+), 14 deletions(-) create mode 100644 l10n/de_DE.js create mode 100644 l10n/de_DE.json diff --git a/l10n/de.js b/l10n/de.js index 360368c3..66bb60b6 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -1,4 +1,4 @@ -OC.L10N.register( +OC.L10N.register( "onlyoffice", { "Access deny" : "Zugriff verweigern", @@ -8,18 +8,18 @@ OC.L10N.register( "Not permitted" : "Nicht erlaubt", "Download failed" : "Download fehlgeschlagen", "The required folder was not found" : "Der gewünschte Ordner wurde nicht gefunden", - "You don't have enough permission to create" : "Sie haben nicht genug Berechtigung zum Erstellen", + "You don't have enough permission to create" : "Du hast nicht genug Berechtigung zum Erstellen", "Template not found" : "Vorlage nicht gefunden", "Can't create file" : "Datei kann nicht erstellt werden", "Format do not supported" : "Dateiformat wird nicht unterstützt", "Conversion not required" : "Umsetzung ist nicht erforderlich", "Failed download converted file" : "Fehler beim Herunterladen der konvertierten Datei", - "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wenden Sie sich an Ihren Administrator", + "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wende Dich an Deinen Administrator", "FileId is empty" : "Datei-ID ist leer", - "You do not have enough permissions to view the file" : "Sie haben nicht genug Berechtigungen zum Ansehen der Datei", + "You do not have enough permissions to view the file" : "Du hast nicht genug Berechtigungen zum Ansehen der Datei", "Error occurred in the document service" : "Im Dokumentenservice ist ein Fehler aufgetreten", "Not supported version" : "Nicht unterstützte Version", - "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator", + "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wende Dich an Deinen Administrator", "Loading, please wait." : "Laden... Bitte warten.", "File created" : "Erstellte Datei", "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", @@ -34,8 +34,8 @@ OC.L10N.register( "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen", "Bad Response. Errors: " : "Bad Response. Fehler:", "Documentation" : "Dokumentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' für die Serveradresse in der folgenden Zeile.", - "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Sie können mit der Anwendung weiterarbeiten, wenn Sie den Hauptschlüssel aktivieren.", + "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '' für die Serveradresse in der folgenden Zeile.", + "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Du kannst mit der Anwendung weiterarbeiten, wenn Du den Hauptschlüssel aktivierst.", "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung", "Advanced server settings" : "Erweiterte Servereinstellungen", "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server", diff --git a/l10n/de.json b/l10n/de.json index 2d7d9bd8..87094d41 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -1,4 +1,4 @@ -{ "translations": { +{ "translations": { "Access deny" : "Zugriff verweigern", "Invalid request" : "Ungültige Anfrage", "Files not found" : "Dateien nicht gefunden", @@ -6,18 +6,18 @@ "Not permitted" : "Nicht erlaubt", "Download failed" : "Download fehlgeschlagen", "The required folder was not found" : "Der gewünschte Ordner wurde nicht gefunden", - "You don't have enough permission to create" : "Sie haben nicht genug Berechtigung zum Erstellen", + "You don't have enough permission to create" : "Du hast nicht genug Berechtigung zum Erstellen", "Template not found" : "Vorlage nicht gefunden", "Can't create file" : "Datei kann nicht erstellt werden", "Format do not supported" : "Dateiformat wird nicht unterstützt", "Conversion not required" : "Umsetzung ist nicht erforderlich", "Failed download converted file" : "Fehler beim Herunterladen der konvertierten Datei", - "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wenden Sie sich an Ihren Administrator", + "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wende Dich an Deinen Administrator", "FileId is empty" : "Datei-ID ist leer", - "You do not have enough permissions to view the file" : "Sie haben nicht genug Berechtigungen zum Ansehen der Datei", + "You do not have enough permissions to view the file" : "Du hast nicht genug Berechtigungen zum Ansehen der Datei", "Error occurred in the document service" : "Im Dokumentenservice ist ein Fehler aufgetreten", "Not supported version" : "Nicht unterstützte Version", - "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator", + "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wende Dich an Deinen Administrator", "Loading, please wait." : "Laden... Bitte warten.", "File created" : "Erstellte Datei", "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", @@ -32,8 +32,8 @@ "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen", "Bad Response. Errors: " : "Bad Response. Fehler:", "Documentation" : "Dokumentation", - "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' für die Serveradresse in der folgenden Zeile.", - "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Sie können mit der Anwendung weiterarbeiten, wenn Sie den Hauptschlüssel aktivieren.", + "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Ändere bitte '' für die Serveradresse in der folgenden Zeile.", + "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Du kannst mit der Anwendung weiterarbeiten, wenn Du den Hauptschlüssel aktivierst.", "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung", "Advanced server settings" : "Erweiterte Servereinstellungen", "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server", diff --git a/l10n/de_DE.js b/l10n/de_DE.js new file mode 100644 index 00000000..360368c3 --- /dev/null +++ b/l10n/de_DE.js @@ -0,0 +1,49 @@ +OC.L10N.register( + "onlyoffice", + { + "Access deny" : "Zugriff verweigern", + "Invalid request" : "Ungültige Anfrage", + "Files not found" : "Dateien nicht gefunden", + "File not found" : "Datei nicht gefunden", + "Not permitted" : "Nicht erlaubt", + "Download failed" : "Download fehlgeschlagen", + "The required folder was not found" : "Der gewünschte Ordner wurde nicht gefunden", + "You don't have enough permission to create" : "Sie haben nicht genug Berechtigung zum Erstellen", + "Template not found" : "Vorlage nicht gefunden", + "Can't create file" : "Datei kann nicht erstellt werden", + "Format do not supported" : "Dateiformat wird nicht unterstützt", + "Conversion not required" : "Umsetzung ist nicht erforderlich", + "Failed download converted file" : "Fehler beim Herunterladen der konvertierten Datei", + "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wenden Sie sich an Ihren Administrator", + "FileId is empty" : "Datei-ID ist leer", + "You do not have enough permissions to view the file" : "Sie haben nicht genug Berechtigungen zum Ansehen der Datei", + "Error occurred in the document service" : "Im Dokumentenservice ist ein Fehler aufgetreten", + "Not supported version" : "Nicht unterstützte Version", + "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator", + "Loading, please wait." : "Laden... Bitte warten.", + "File created" : "Erstellte Datei", + "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", + "Convert and open document" : "Dokument konvertieren und öffnen", + "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", + "Document" : "Dokument", + "Spreadsheet" : "Tabelle", + "Presentation" : "Präsentation", + "Error when trying to connect" : "Fehler beim Anschließen", + "Settings have been successfully updated" : "Einstellungen wurden erfolgreich aktualisiert", + "Bad Request or timeout error" : "Bad Request oder Timeout Fehlermeldung", + "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen", + "Bad Response. Errors: " : "Bad Response. Fehler:", + "Documentation" : "Dokumentation", + "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' für die Serveradresse in der folgenden Zeile.", + "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Sie können mit der Anwendung weiterarbeiten, wenn Sie den Hauptschlüssel aktivieren.", + "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung", + "Advanced server settings" : "Erweiterte Servereinstellungen", + "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server", + "Server address for internal requests from the Document Editing Service" : "Serveradresse für interne Anforderungen vom Dokumentbearbeitung-Service", + "Secret key (leave blank to disable)" : "Geheimer Schlüssel (freilassen, um zu deaktivieren)", + "Open file in the same tab" : "Datei in der gleichen Registerkarte öffnen", + "The default application for opening the format" : "Die Standardanwendung zum Öffnen des Formats", + "Save" : "Speichern", + "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich." +}, +"nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json new file mode 100644 index 00000000..2d7d9bd8 --- /dev/null +++ b/l10n/de_DE.json @@ -0,0 +1,47 @@ +{ "translations": { + "Access deny" : "Zugriff verweigern", + "Invalid request" : "Ungültige Anfrage", + "Files not found" : "Dateien nicht gefunden", + "File not found" : "Datei nicht gefunden", + "Not permitted" : "Nicht erlaubt", + "Download failed" : "Download fehlgeschlagen", + "The required folder was not found" : "Der gewünschte Ordner wurde nicht gefunden", + "You don't have enough permission to create" : "Sie haben nicht genug Berechtigung zum Erstellen", + "Template not found" : "Vorlage nicht gefunden", + "Can't create file" : "Datei kann nicht erstellt werden", + "Format do not supported" : "Dateiformat wird nicht unterstützt", + "Conversion not required" : "Umsetzung ist nicht erforderlich", + "Failed download converted file" : "Fehler beim Herunterladen der konvertierten Datei", + "ONLYOFFICE app not configured. Please contact admin" : "ONLYOFFICE App ist nicht konfiguriert. Bitte wenden Sie sich an Ihren Administrator", + "FileId is empty" : "Datei-ID ist leer", + "You do not have enough permissions to view the file" : "Sie haben nicht genug Berechtigungen zum Ansehen der Datei", + "Error occurred in the document service" : "Im Dokumentenservice ist ein Fehler aufgetreten", + "Not supported version" : "Nicht unterstützte Version", + "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator", + "Loading, please wait." : "Laden... Bitte warten.", + "File created" : "Erstellte Datei", + "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", + "Convert and open document" : "Dokument konvertieren und öffnen", + "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", + "Document" : "Dokument", + "Spreadsheet" : "Tabelle", + "Presentation" : "Präsentation", + "Error when trying to connect" : "Fehler beim Anschließen", + "Settings have been successfully updated" : "Einstellungen wurden erfolgreich aktualisiert", + "Bad Request or timeout error" : "Bad Request oder Timeout Fehlermeldung", + "Server can't read xml" : "Server kann eine xml-Datei nicht einlesen", + "Bad Response. Errors: " : "Bad Response. Fehler:", + "Documentation" : "Dokumentation", + "ONLYOFFICE Document Service Location specifies the address of the server with the document services installed. Please change the '' for the server address in the below line." : "ONLYOFFICE Document Servicestandort gibt die Adresse des Servers mit den installierten Dokumentdiensten an. Bitte ändern Sie '' für die Serveradresse in der folgenden Zeile.", + "Encryption App is enabled, the application cannot work. You can continue working with the application if you enable master key." : "App Verschlüsselung ist aktiviert. Die Anwendung kann nicht funktionieren. Sie können mit der Anwendung weiterarbeiten, wenn Sie den Hauptschlüssel aktivieren.", + "Document Editing Service address" : "Serviceadresse der Dokumentbearbeitung", + "Advanced server settings" : "Erweiterte Servereinstellungen", + "Document Editing Service address for internal requests from the server" : "Serviceadresse der Dokumentbearbeitung für interne Anforderungen vom Server", + "Server address for internal requests from the Document Editing Service" : "Serveradresse für interne Anforderungen vom Dokumentbearbeitung-Service", + "Secret key (leave blank to disable)" : "Geheimer Schlüssel (freilassen, um zu deaktivieren)", + "Open file in the same tab" : "Datei in der gleichen Registerkarte öffnen", + "The default application for opening the format" : "Die Standardanwendung zum Öffnen des Formats", + "Save" : "Speichern", + "Mixed Active Content is not allowed. HTTPS address for Document Server is required." : "Mixed Active Content ist nicht möglich. HTTPS-Adresse für Document Server ist erforderlich." +},"pluralForm" :"nplurals=2; plural=(n != 1);" +} \ No newline at end of file From e44513673b4edfbcfe63c13496d8e2becb887b93 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 27 Mar 2018 15:57:33 +0300 Subject: [PATCH 07/33] encryption issue --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09fafdde..7e2378cb 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ The ONLYOFFICE integration follows the API documented here https://api.onlyoffic ## Known issues -If the document is shared using the **Federated Cloud Sharing** app, the co-editing among the servers will not be avaialble. The users from one and the same server can edit the document in the co-editing mode, but the users from two (or more) different servers will not be able to collaborate on the same document in real time. +* If the document is shared using the **Federated Cloud Sharing** app, the co-editing among the servers will not be avaialble. The users from one and the same server can edit the document in the co-editing mode, but the users from two (or more) different servers will not be able to collaborate on the same document in real time. -Adding the storage using the **External storages** app has issues with the co-editing in some cases. If the connection is made using the same authorization keys (the _Username and password_ or _Global credentials_ authentication type is selected), then the co-editing is available for the users. If different authorization keys are used (_Log-in credentials, save in database_ or _User entered, store in database_ authentication options), the co-editing is not available. When the _Log-in credentials, save in session_ authentication type is used, the files cannot be opened in the editor. +* Adding the storage using the **External storages** app has issues with the co-editing in some cases. If the connection is made using the same authorization keys (the _Username and password_ or _Global credentials_ authentication type is selected), then the co-editing is available for the users. If different authorization keys are used (_Log-in credentials, save in database_ or _User entered, store in database_ authentication options), the co-editing is not available. When the _Log-in credentials, save in session_ authentication type is used, the files cannot be opened in the editor. + +* ownCloud/Nextcloud provides an option to encrypt the file storage. But if the encryption with the _per-user encryption keys_ (used by default in ownCloud/Nextcloud **Default encryption module** app) is enabled, ONLYOFFICE Document Server cannot open the encrypted files for editing and save them after the editing. The ONLYOFFICE section of the administrative settings page will display a notification about it. However if you set the encryption with the _master key_, ONLYOFFICE application will work as intended. The instruction on enabling _master key_ based encryption is available in the official documentation on [ownCloud](https://doc.owncloud.org/server/latest/admin_manual/configuration_files/encryption_configuration.html#enabling-master-key-based-encryption)/[Nextcloud](https://docs.nextcloud.com/server/12/admin_manual/configuration_files/encryption_configuration.html#occ-encryption-commands) websites. From ae3830f3f250f1c4f26057f846212ba4fad558d2 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 30 Mar 2018 11:01:14 +0300 Subject: [PATCH 08/33] Fix ONLYOFFICE/docker-onlyoffice-owncloud#16 --- controller/settingscontroller.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index f8175c50..71f3073c 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -227,8 +227,10 @@ private function formats() { private function checkDocServiceUrl() { try { + $documentServerUrl = $this->config->GetDocumentServerUrl(); if (substr($this->urlGenerator->getAbsoluteURL("/"), 0, strlen("https")) === "https" - && substr($this->config->GetDocumentServerUrl("/"), 0, strlen("https")) !== "https") { + && preg_match("/^https?:\/\//i", $documentServerUrl) + && substr($documentServerUrl, 0, strlen("https")) !== "https") { throw new \Exception($this->trans->t("Mixed Active Content is not allowed. HTTPS address for Document Server is required.")); } From fa6fec56d9e1a16f186980cd1081dfee9af3beea Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 15 May 2018 14:02:13 +0300 Subject: [PATCH 09/33] AGPL --- appinfo/app.php | 39 +++++++++++++++++-------------- appinfo/application.php | 39 +++++++++++++++++-------------- appinfo/routes.php | 39 +++++++++++++++++-------------- controller/callbackcontroller.php | 39 +++++++++++++++++-------------- controller/editorcontroller.php | 39 +++++++++++++++++-------------- controller/settingscontroller.php | 39 +++++++++++++++++-------------- css/editor.css | 39 +++++++++++++++++-------------- css/main.css | 39 +++++++++++++++++-------------- css/settings.css | 39 +++++++++++++++++-------------- js/editor.js | 39 +++++++++++++++++-------------- js/main.js | 39 +++++++++++++++++-------------- js/settings.js | 39 +++++++++++++++++-------------- lib/adminsection.php | 39 +++++++++++++++++-------------- lib/adminsettings.php | 39 +++++++++++++++++-------------- lib/appconfig.php | 39 +++++++++++++++++-------------- lib/crypt.php | 39 +++++++++++++++++-------------- lib/documentservice.php | 39 +++++++++++++++++-------------- settings.php | 39 +++++++++++++++++-------------- templates/editor.php | 39 +++++++++++++++++-------------- templates/settings.php | 39 +++++++++++++++++-------------- 20 files changed, 420 insertions(+), 360 deletions(-) diff --git a/appinfo/app.php b/appinfo/app.php index f4cbcc06..0cbf50ae 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/appinfo/application.php b/appinfo/application.php index 907764f4..257d194c 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/appinfo/routes.php b/appinfo/routes.php index 53556226..69af7c52 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 2280697a..b868cd52 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index d5a28bcf..d3939f0a 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 71f3073c..30fdf712 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/css/editor.css b/css/editor.css index 758ac6d0..41209f33 100644 --- a/css/editor.css +++ b/css/editor.css @@ -2,24 +2,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/css/main.css b/css/main.css index 9f4fb11b..36105959 100644 --- a/css/main.css +++ b/css/main.css @@ -2,24 +2,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/css/settings.css b/css/settings.css index e9602902..bf02beb2 100644 --- a/css/settings.css +++ b/css/settings.css @@ -2,24 +2,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/js/editor.js b/js/editor.js index 803edee7..54034167 100644 --- a/js/editor.js +++ b/js/editor.js @@ -2,24 +2,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/js/main.js b/js/main.js index 7c97ae34..09a7dd0b 100644 --- a/js/main.js +++ b/js/main.js @@ -2,24 +2,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/js/settings.js b/js/settings.js index 2839347c..0227e34c 100644 --- a/js/settings.js +++ b/js/settings.js @@ -2,24 +2,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/adminsection.php b/lib/adminsection.php index e2e1c912..33f9c2c2 100644 --- a/lib/adminsection.php +++ b/lib/adminsection.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/adminsettings.php b/lib/adminsettings.php index 211c6ed8..04153381 100644 --- a/lib/adminsettings.php +++ b/lib/adminsettings.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/appconfig.php b/lib/appconfig.php index 02f497e8..6c56b84b 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/crypt.php b/lib/crypt.php index 9c31e661..524d30c7 100644 --- a/lib/crypt.php +++ b/lib/crypt.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/documentservice.php b/lib/documentservice.php index 6c78abca..1a987af3 100644 --- a/lib/documentservice.php +++ b/lib/documentservice.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/settings.php b/settings.php index a592d4d5..5ad04e3b 100644 --- a/settings.php +++ b/settings.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/templates/editor.php b/templates/editor.php index 6bc02fbf..1b0ad4be 100644 --- a/templates/editor.php +++ b/templates/editor.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/templates/settings.php b/templates/settings.php index dbe2a2f0..bec2f4b6 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -3,24 +3,27 @@ * * (c) Copyright Ascensio System Limited 2010-2018 * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * This program is a free software product. + * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. + * + * The interactive user interfaces in modified source and object code versions of the Program + * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ From 033ba998dc83b2ca48d0e7b0ae318e7e9469f998 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 15 May 2018 15:51:04 +0300 Subject: [PATCH 10/33] Fixed #88 - limit access to groups --- appinfo/info.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index e3025e4a..d3750b97 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,9 +9,6 @@ Ascensio System SIA 1.3.0 Onlyoffice - - - https://api.onlyoffice.com/editors/owncloud https://api.onlyoffice.com/editors/owncloud From a315db60a72af5f0bf679d893a1f6a3b3c6a5b78 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 6 Jun 2018 13:15:31 +0300 Subject: [PATCH 11/33] delete error (b2519fdb1ffc90189a32865e9464b51628c3c7ae) --- js/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/editor.js b/js/editor.js index 54034167..ca6261d9 100644 --- a/js/editor.js +++ b/js/editor.js @@ -47,7 +47,7 @@ return; } - if (typeof DocsAPI === "undefined" && !error.length) { + if (typeof DocsAPI === "undefined") { displayError(t(OCA.Onlyoffice.AppName, "ONLYOFFICE cannot be reached. Please contact admin")); return; } From 3d74d2d77dd4fbdd71b134676d4c669bc24518f6 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 2 Jul 2018 14:11:05 +0300 Subject: [PATCH 12/33] change error message --- controller/settingscontroller.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 30fdf712..889b60f3 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -237,6 +237,13 @@ private function checkDocServiceUrl() { throw new \Exception($this->trans->t("Mixed Active Content is not allowed. HTTPS address for Document Server is required.")); } + } catch (\Exception $e) { + $this->logger->error("Protocol on check error: " . $e->getMessage(), array("app" => $this->appName)); + return $e->getMessage(); + } + + try { + $documentService = new DocumentService($this->trans, $this->config); $commandResponse = $documentService->CommandRequest("version"); @@ -252,6 +259,13 @@ private function checkDocServiceUrl() { throw new \Exception($this->trans->t("Not supported version")); } + } catch (\Exception $e) { + $this->logger->error("CommandRequest on check error: " . $e->getMessage(), array("app" => $this->appName)); + return $e->getMessage(); + } + + try { + $hashUrl = $this->crypt->GetHash(["action" => "empty"]); $fileUrl = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.emptyfile", ["doc" => $hashUrl]); if (!empty($this->config->GetStorageUrl())) { @@ -261,7 +275,7 @@ private function checkDocServiceUrl() { $documentService->GetConvertedUri($fileUrl, "docx", "docx", "check_" . rand()); } catch (\Exception $e) { - $this->logger->error("CommandRequest on check error: " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("GetConvertedUri on check error: " . $e->getMessage(), array("app" => $this->appName)); return $e->getMessage(); } From 5f3a15d86848eb5c6d21900a24c3834dabffdaad Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 6 Jul 2018 17:08:47 +0300 Subject: [PATCH 13/33] handle save error --- controller/callbackcontroller.php | 100 ++++++++++++++++-------------- 1 file changed, 52 insertions(+), 48 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index b868cd52..eac8c787 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -347,63 +347,67 @@ public function track($doc, $users, $key, $status, $url) { return new JSONResponse(["message" => $this->trans->t("Url not found")], Http::STATUS_BAD_REQUEST); } - $userId = $users[0]; - $user = $this->userManager->get($userId); - if (!empty($user)) { - \OC_Util::tearDownFS(); - \OC_Util::setupFS($userId); - - $this->userSession->setUser($user); - } else { - $ownerId = $hashData->ownerId; - - \OC_Util::tearDownFS(); - \OC_Util::setupFS($ownerId); - } - - $token = isset($hashData->token) ? $hashData->token : NULL; - list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token); - - if (isset($error)) { - return $error; - } + try { + $userId = $users[0]; + $user = $this->userManager->get($userId); + if (!empty($user)) { + \OC_Util::tearDownFS(); + \OC_Util::setupFS($userId); + + $this->userSession->setUser($user); + } else { + $ownerId = $hashData->ownerId; + + \OC_Util::tearDownFS(); + \OC_Util::setupFS($ownerId); + } - $documentServerUrl = $this->config->GetDocumentServerInternalUrl(true); - if (!empty($documentServerUrl)) { - $from = $this->config->GetDocumentServerUrl(); + $token = isset($hashData->token) ? $hashData->token : NULL; + list ($file, $error) = empty($token) ? $this->getFile($userId, $fileId) : $this->getFileByToken($fileId, $token); - if (!preg_match("/^https?:\/\//i", $from)) { - $parsedUrl = parse_url($url); - $from = $parsedUrl["scheme"] . "://" . $parsedUrl["host"] . (array_key_exists("port", $parsedUrl) ? (":" . $parsedUrl["port"]) : "") . $from; + if (isset($error)) { + return $error; } - if ($from !== $documentServerUrl) - { - $this->logger->debug("Replace in track from " . $from . " to " . $documentServerUrl, array("app" => $this->appName)); - $url = str_replace($from, $documentServerUrl, $url); - } - } + $documentServerUrl = $this->config->GetDocumentServerInternalUrl(true); + if (!empty($documentServerUrl)) { + $from = $this->config->GetDocumentServerUrl(); - $fileName = $file->getName(); - $curExt = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); - $downloadExt = strtolower(pathinfo($url, PATHINFO_EXTENSION)); + if (!preg_match("/^https?:\/\//i", $from)) { + $parsedUrl = parse_url($url); + $from = $parsedUrl["scheme"] . "://" . $parsedUrl["host"] . (array_key_exists("port", $parsedUrl) ? (":" . $parsedUrl["port"]) : "") . $from; + } - $documentService = new DocumentService($this->trans, $this->config); - if ($downloadExt !== $curExt) { - $key = DocumentService::GenerateRevisionId($fileId . $url); + if ($from !== $documentServerUrl) + { + $this->logger->debug("Replace in track from " . $from . " to " . $documentServerUrl, array("app" => $this->appName)); + $url = str_replace($from, $documentServerUrl, $url); + } + } - try { - $this->logger->debug("GetConvertedUri from " . $downloadExt . " to " . $curExt . " " . $url, array("app" => $this->appName)); - $url = $documentService->GetConvertedUri($url, $downloadExt, $curExt, $key); - } catch (\Exception $e) { - $this->logger->error("GetConvertedUri on save error: " . $e->getMessage(), array("app" => $this->appName)); - return new JSONResponse(["message" => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR); + $fileName = $file->getName(); + $curExt = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); + $downloadExt = strtolower(pathinfo($url, PATHINFO_EXTENSION)); + + $documentService = new DocumentService($this->trans, $this->config); + if ($downloadExt !== $curExt) { + $key = DocumentService::GenerateRevisionId($fileId . $url); + + try { + $this->logger->debug("GetConvertedUri from " . $downloadExt . " to " . $curExt . " " . $url, array("app" => $this->appName)); + $url = $documentService->GetConvertedUri($url, $downloadExt, $curExt, $key); + } catch (\Exception $e) { + $this->logger->error("GetConvertedUri on save error: " . $e->getMessage(), array("app" => $this->appName)); + return new JSONResponse(["message" => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR); + } } - } - if (($newData = $documentService->Request($url))) { - $file->putContent($newData); - $error = 0; + if (($newData = $documentService->Request($url))) { + $file->putContent($newData); + $error = 0; + } + } catch (\Exception $e) { + $this->logger->error("Track " . $trackerStatus . " error: " . $e->getMessage(), array("app" => $this->appName)); } break; From 756859edb7e051a5f2b4b791df845a9dd5fc3af9 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Fri, 6 Jul 2018 17:17:51 +0300 Subject: [PATCH 14/33] change loglevel --- controller/callbackcontroller.php | 34 +++++++++++++++---------------- controller/editorcontroller.php | 10 ++++----- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index eac8c787..3f448ed1 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -177,11 +177,11 @@ public function download($doc) { list ($hashData, $error) = $this->crypt->ReadHash($doc); if ($hashData === NULL) { - $this->logger->info("Download with empty or not correct hash: " . $error, array("app" => $this->appName)); + $this->logger->error("Download with empty or not correct hash: " . $error, array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } if ($hashData->action !== "download") { - $this->logger->info("Download with other action", array("app" => $this->appName)); + $this->logger->error("Download with other action", array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST); } @@ -191,7 +191,7 @@ public function download($doc) { if (!empty($this->config->GetDocumentServerSecret())) { $header = \OC::$server->getRequest()->getHeader($this->config->JwtHeader()); if (empty($header)) { - $this->logger->info("Download without jwt", array("app" => $this->appName)); + $this->logger->error("Download without jwt", array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } @@ -200,7 +200,7 @@ public function download($doc) { try { $decodedHeader = \Firebase\JWT\JWT::decode($header, $this->config->GetDocumentServerSecret(), array("HS256")); } catch (\UnexpectedValueException $e) { - $this->logger->info("Download with invalid jwt: " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("Download with invalid jwt: " . $e->getMessage(), array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } } @@ -217,7 +217,7 @@ public function download($doc) { try { return new DataDownloadResponse($file->getContent(), $file->getName(), $file->getMimeType()); } catch (NotPermittedException $e) { - $this->logger->info("Download Not permitted: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("Download Not permitted: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Not permitted")], Http::STATUS_FORBIDDEN); } return new JSONResponse(["message" => $this->trans->t("Download failed")], Http::STATUS_INTERNAL_SERVER_ERROR); @@ -240,18 +240,18 @@ public function emptyfile($doc) { list ($hashData, $error) = $this->crypt->ReadHash($doc); if ($hashData === NULL) { - $this->logger->info("Download empty with empty or not correct hash: " . $error, array("app" => $this->appName)); + $this->logger->error("Download empty with empty or not correct hash: " . $error, array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } if ($hashData->action !== "empty") { - $this->logger->info("Download empty with other action", array("app" => $this->appName)); + $this->logger->error("Download empty with other action", array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST); } if (!empty($this->config->GetDocumentServerSecret())) { $header = \OC::$server->getRequest()->getHeader($this->config->JwtHeader()); if (empty($header)) { - $this->logger->info("Download empty without jwt", array("app" => $this->appName)); + $this->logger->error("Download empty without jwt", array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } @@ -260,7 +260,7 @@ public function emptyfile($doc) { try { $decodedHeader = \Firebase\JWT\JWT::decode($header, $this->config->GetDocumentServerSecret(), array("HS256")); } catch (\UnexpectedValueException $e) { - $this->logger->info("Download empty with invalid jwt: " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("Download empty with invalid jwt: " . $e->getMessage(), array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } } @@ -276,7 +276,7 @@ public function emptyfile($doc) { try { return new DataDownloadResponse($template, "new.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); } catch (NotPermittedException $e) { - $this->logger->info("Download Not permitted: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("Download Not permitted: " . $fileId . " " . $e->getMessage(), array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Not permitted")], Http::STATUS_FORBIDDEN); } return new JSONResponse(["message" => $this->trans->t("Download failed")], Http::STATUS_INTERNAL_SERVER_ERROR); @@ -301,11 +301,11 @@ public function track($doc, $users, $key, $status, $url) { list ($hashData, $error) = $this->crypt->ReadHash($doc); if ($hashData === NULL) { - $this->logger->info("Track with empty or not correct hash: " . $error, array("app" => $this->appName)); + $this->logger->error("Track with empty or not correct hash: " . $error, array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } if ($hashData->action !== "track") { - $this->logger->info("Track with other action", array("app" => $this->appName)); + $this->logger->error("Track with other action", array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Invalid request")], Http::STATUS_BAD_REQUEST); } @@ -315,7 +315,7 @@ public function track($doc, $users, $key, $status, $url) { if (!empty($this->config->GetDocumentServerSecret())) { $header = \OC::$server->getRequest()->getHeader($this->config->JwtHeader()); if (empty($header)) { - $this->logger->info("Track without jwt", array("app" => $this->appName)); + $this->logger->error("Track without jwt", array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } @@ -331,7 +331,7 @@ public function track($doc, $users, $key, $status, $url) { $status = $payload->status; $url = isset($payload->url) ? $payload->url : NULL; } catch (\UnexpectedValueException $e) { - $this->logger->info("Track with invalid jwt: " . $e->getMessage(), array("app" => $this->appName)); + $this->logger->error("Track with invalid jwt: " . $e->getMessage(), array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Access denied")], Http::STATUS_FORBIDDEN); } } @@ -343,7 +343,7 @@ public function track($doc, $users, $key, $status, $url) { case "MustSave": case "Corrupted": if (empty($url)) { - $this->logger->info("Track without url: " . $fileId . " status " . $trackerStatus, array("app" => $this->appName)); + $this->logger->error("Track without url: " . $fileId . " status " . $trackerStatus, array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Url not found")], Http::STATUS_BAD_REQUEST); } @@ -436,13 +436,13 @@ private function getFile($userId, $fileId) { $files = $this->root->getUserFolder($userId)->getById($fileId); if (empty($files)) { - $this->logger->info("Files not found: " . $fileId, array("app" => $this->appName)); + $this->logger->error("Files not found: " . $fileId, array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("Files not found")], Http::STATUS_NOT_FOUND); } $file = $files[0]; if (! $file instanceof File) { - $this->logger->info("File not found: " . $fileId, array("app" => $this->appName)); + $this->logger->error("File not found: " . $fileId, array("app" => $this->appName)); return new JSONResponse(["message" => $this->trans->t("File not found")], Http::STATUS_NOT_FOUND); } diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index d3939f0a..988ad595 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -182,11 +182,11 @@ public function create($name, $dir) { $folder = $userFolder->get($dir); if ($folder === NULL) { - $this->logger->info("Folder for file creation was not found: " . $dir, array("app" => $this->appName)); + $this->logger->error("Folder for file creation was not found: " . $dir, array("app" => $this->appName)); return ["error" => $this->trans->t("The required folder was not found")]; } if (!$folder->isCreatable()) { - $this->logger->info("Folder for file creation without permission: " . $dir, array("app" => $this->appName)); + $this->logger->error("Folder for file creation without permission: " . $dir, array("app" => $this->appName)); return ["error" => $this->trans->t("You don't have enough permission to create")]; } @@ -204,7 +204,7 @@ public function create($name, $dir) { $template = file_get_contents($templatePath); if (!$template) { - $this->logger->info("Template for file creation not found: " . $templatePath, array("app" => $this->appName)); + $this->logger->error("Template for file creation not found: " . $templatePath, array("app" => $this->appName)); return ["error" => $this->trans->t("Template not found")]; } @@ -217,7 +217,7 @@ public function create($name, $dir) { $fileInfo = $view->getFileInfo($filePath); if ($fileInfo === false) { - $this->logger->info("File not found: " . $filePath, array("app" => $this->appName)); + $this->logger->error("File not found: " . $filePath, array("app" => $this->appName)); return ["error" => $this->trans->t("File not found")]; } @@ -257,7 +257,7 @@ public function convert($fileId) { } if (!isset($format["conv"]) || $format["conv"] !== TRUE) { - $this->logger->debug("Conversion is not required: " . $fileName, array("app" => $this->appName)); + $this->logger->info("Conversion is not required: " . $fileName, array("app" => $this->appName)); return ["error" => $this->trans->t("Conversion is not required")]; } From 8da8052974b140788482a2b23138e9b56fe43a91 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 9 Jul 2018 15:40:28 +0300 Subject: [PATCH 15/33] check url from editors --- controller/settingscontroller.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 889b60f3..a754a080 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -264,6 +264,7 @@ private function checkDocServiceUrl() { return $e->getMessage(); } + $convertedFileUri; try { $hashUrl = $this->crypt->GetHash(["action" => "empty"]); @@ -272,13 +273,22 @@ private function checkDocServiceUrl() { $fileUrl = str_replace($this->urlGenerator->getAbsoluteURL("/"), $this->config->GetStorageUrl(), $fileUrl); } - $documentService->GetConvertedUri($fileUrl, "docx", "docx", "check_" . rand()); + $convertedFileUri = $documentService->GetConvertedUri($fileUrl, "docx", "docx", "check_" . rand()); } catch (\Exception $e) { $this->logger->error("GetConvertedUri on check error: " . $e->getMessage(), array("app" => $this->appName)); return $e->getMessage(); } + try { + if ($documentService->Request($convertedFileUri) === FALSE) { + throw new \Exception($this->trans->t("Error occurred in the document service")); + } + } catch (\Exception $e) { + $this->logger->error("Request converted file on check error: " . $convertedFileUri . " " . $e->getMessage(), array("app" => $this->appName)); + return $e->getMessage(); + } + return ""; } From b9a38ba2f1833b3798dc069e63b3b6ed9750d25a Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 9 Jul 2018 16:57:22 +0300 Subject: [PATCH 16/33] goback in same tab --- controller/editorcontroller.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 988ad595..7110508b 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -468,6 +468,9 @@ public function config($fileId, $token = NULL) { $params["editorConfig"]["customization"]["goback"] = [ "url" => $folderLink ]; + if ($this->config->GetSameTab()) { + $params["editorConfig"]["customization"]["goback"]["blank"] = false; + } } $params = $this->setCustomization($params); From 129cb1256ce2c07b484da7ed148b9162881f4616 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 10 Jul 2018 11:49:21 +0300 Subject: [PATCH 17/33] expanding the list of formats --- lib/appconfig.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/appconfig.php b/lib/appconfig.php index 6c56b84b..086936cd 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -444,22 +444,34 @@ public function SettingsAreSuccessful() { "ppsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "type" => "presentation", "edit" => true, "def" => true ], "txt" => [ "mime" => "text/plain", "type" => "text", "edit" => true ], "csv" => [ "mime" => "text/csv", "type" => "spreadsheet", "edit" => true ], + "dot" => [ "mime" => "application/msword", "type" => "text", "conv" => true ], + "dotx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "type" => "text", "conv" => true ], + "dotm" => [ "mime" => "application/vnd.ms-word.template.macroEnabled.12", "type" => "text", "conv" => true ], "docm" => [ "mime" => "application/vnd.ms-word.document.macroEnabled.12", "type" => "text", "conv" => true ], "xlsm" => [ "mime" => "application/vnd.ms-excel.sheet.macroEnabled.12", "type" => "spreadsheet", "conv" => true ], + "xlt" => [ "mime" => "application/excel", "type" => "spreadsheet", "conv" => true ], "xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "spreadsheet", "conv" => true ], "xltm" => [ "mime" => "application/vnd.ms-excel.template.macroEnabled.12", "type" => "spreadsheet", "conv" => true ], "pptm" => [ "mime" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12", "type" => "presentation", "conv" => true ], "ppsm" => [ "mime" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", "type" => "presentation", "conv" => true ], + "pot" => [ "mime" => "application/mspowerpoint", "type" => "presentation", "conv" => true ], "potx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.template", "type" => "presentation", "conv" => true ], "potm" => [ "mime" => "application/vnd.ms-powerpoint.template.macroEnabled.12", "type" => "presentation", "conv" => true ], "odt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ], "ods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ], "odp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ], + "ott" => [ "mime" => "application/vnd.oasis.opendocument.text-template", "type" => "text", "conv" => true ], + "ots" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet-template", "type" => "spreadsheet", "conv" => true ], + "otp" => [ "mime" => "application/vnd.oasis.opendocument.presentation-template", "type" => "presentation", "conv" => true ], + "fodt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ], + "fods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ], + "fodp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ], "doc" => [ "mime" => "application/msword", "type" => "text", "conv" => true ], "xls" => [ "mime" => "application/vnd.ms-excel", "type" => "spreadsheet", "conv" => true ], "ppt" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ], + "pps" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ], "epub" => [ "mime" => "application/epub+zip", "type" => "text", "conv" => true ], - "rtf" => [ "mime" => "text/rtf", "type" => "text", "type" => "text", "conv" => true ], + "rtf" => [ "mime" => "text/rtf", "type" => "text", "conv" => true ], "mht" => [ "mime" => "message/rfc822", "conv" => true ], "html" => [ "mime" => "text/html", "type" => "text", "conv" => true ], "htm" => [ "mime" => "text/html", "type" => "text", "conv" => true ], From 974e0ad067ebd8e3be59fa77605085d115aef3bc Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 10 Jul 2018 13:13:22 +0300 Subject: [PATCH 18/33] default action for not convertible formats --- controller/settingscontroller.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index a754a080..289525f7 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -116,7 +116,7 @@ public function index() { $formats = $this->formats(); $defFormats = array(); foreach ($formats as $format => $setting) { - if (array_key_exists("edit", $setting) && $setting["edit"]) { + if (!array_key_exists("conv", $setting) || !$setting["conv"]) { $defFormats[$format] = array_key_exists("def", $setting) && $setting["def"]; } } @@ -206,13 +206,12 @@ public function GetSettings() { * @NoAdminRequired */ private function formats() { - $defFormats = $this->config->GetDefaultFormats(); - $result = $this->config->formats; - foreach ($result as $format => $setting) { - if (array_key_exists("edit", $setting) && $setting["edit"] - && array_key_exists($format, $defFormats)) { - $result[$format]["def"] = ($defFormats[$format] === true || $defFormats[$format] === "true"); + + $defFormats = $this->config->GetDefaultFormats(); + foreach ($defFormats as $format => $setting) { + if (array_key_exists($format, $result)) { + $result[$format]["def"] = ($setting === true || $setting === "true"); } } From 54508fdfb49064d99152c9ce6ba4e19699fc0d14 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 16 Jul 2018 17:33:16 +0300 Subject: [PATCH 19/33] Fixed #200 - editing from group folder with shared link --- controller/callbackcontroller.php | 4 +++- controller/editorcontroller.php | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 3f448ed1..097ea139 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -359,7 +359,9 @@ public function track($doc, $users, $key, $status, $url) { $ownerId = $hashData->ownerId; \OC_Util::tearDownFS(); - \OC_Util::setupFS($ownerId); + if (!empty($ownerId)) { + \OC_Util::setupFS($ownerId); + } } $token = isset($hashData->token) ? $hashData->token : NULL; diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 7110508b..5e0617ac 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -430,7 +430,13 @@ public function config($fileId, $token = NULL) { $editable = $file->isUpdateable() && (empty($token) || ($this->getShare($token)[0]->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE); if ($editable && $canEdit) { - $hashCallback = $this->crypt->GetHash(["fileId" => $fileId, "ownerId" => $file->getOwner()->getUID(), "token" => $token, "action" => "track"]); + $ownerId = NULL; + $owner = $file->getOwner(); + if (!empty($owner)) { + $ownerId = $owner->getUID(); + } + + $hashCallback = $this->crypt->GetHash(["fileId" => $fileId, "ownerId" => $ownerId, "token" => $token, "action" => "track"]); $callback = $this->urlGenerator->linkToRouteAbsolute($this->appName . ".callback.track", ["doc" => $hashCallback]); if (!empty($this->config->GetStorageUrl())) { From d2fbd74e1ac698dc8524670c60720a71a3daabe5 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 16 Jul 2018 17:39:21 +0300 Subject: [PATCH 20/33] delete a space --- appinfo/app.php | 26 +++++++++++++------------- appinfo/application.php | 26 +++++++++++++------------- appinfo/routes.php | 26 +++++++++++++------------- controller/callbackcontroller.php | 26 +++++++++++++------------- controller/editorcontroller.php | 26 +++++++++++++------------- controller/settingscontroller.php | 26 +++++++++++++------------- css/editor.css | 26 +++++++++++++------------- css/main.css | 26 +++++++++++++------------- css/settings.css | 26 +++++++++++++------------- js/editor.js | 26 +++++++++++++------------- js/main.js | 26 +++++++++++++------------- js/settings.js | 26 +++++++++++++------------- lib/adminsection.php | 26 +++++++++++++------------- lib/adminsettings.php | 26 +++++++++++++------------- lib/appconfig.php | 26 +++++++++++++------------- lib/crypt.php | 26 +++++++++++++------------- lib/documentservice.php | 26 +++++++++++++------------- settings.php | 26 +++++++++++++------------- templates/editor.php | 26 +++++++++++++------------- templates/settings.php | 26 +++++++++++++------------- 20 files changed, 260 insertions(+), 260 deletions(-) diff --git a/appinfo/app.php b/appinfo/app.php index 0cbf50ae..7ddc0624 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/appinfo/application.php b/appinfo/application.php index 257d194c..85897576 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/appinfo/routes.php b/appinfo/routes.php index 69af7c52..53a8c0db 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 097ea139..9785e6b3 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 5e0617ac..eba86ba1 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index 289525f7..ee6eb81c 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/css/editor.css b/css/editor.css index 41209f33..7d74b5ca 100644 --- a/css/editor.css +++ b/css/editor.css @@ -4,24 +4,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/css/main.css b/css/main.css index 36105959..40cbb0cc 100644 --- a/css/main.css +++ b/css/main.css @@ -4,24 +4,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/css/settings.css b/css/settings.css index bf02beb2..e1a382ca 100644 --- a/css/settings.css +++ b/css/settings.css @@ -4,24 +4,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/js/editor.js b/js/editor.js index ca6261d9..517027d1 100644 --- a/js/editor.js +++ b/js/editor.js @@ -4,24 +4,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/js/main.js b/js/main.js index 09a7dd0b..3b6b3829 100644 --- a/js/main.js +++ b/js/main.js @@ -4,24 +4,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/js/settings.js b/js/settings.js index 0227e34c..3bcc1bbc 100644 --- a/js/settings.js +++ b/js/settings.js @@ -4,24 +4,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/adminsection.php b/lib/adminsection.php index 33f9c2c2..d182c71c 100644 --- a/lib/adminsection.php +++ b/lib/adminsection.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/adminsettings.php b/lib/adminsettings.php index 04153381..9f96d864 100644 --- a/lib/adminsettings.php +++ b/lib/adminsettings.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/appconfig.php b/lib/appconfig.php index 086936cd..c21e856a 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/crypt.php b/lib/crypt.php index 524d30c7..b7790ff7 100644 --- a/lib/crypt.php +++ b/lib/crypt.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/lib/documentservice.php b/lib/documentservice.php index 1a987af3..74e58f20 100644 --- a/lib/documentservice.php +++ b/lib/documentservice.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/settings.php b/settings.php index 5ad04e3b..ceeb6bec 100644 --- a/settings.php +++ b/settings.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/templates/editor.php b/templates/editor.php index 1b0ad4be..3be8b52c 100644 --- a/templates/editor.php +++ b/templates/editor.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ diff --git a/templates/settings.php b/templates/settings.php index bec2f4b6..3e71e940 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -5,24 +5,24 @@ * * This program is a free software product. * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License - * (AGPL) version 3 as published by the Free Software Foundation. - * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * (AGPL) version 3 as published by the Free Software Foundation. + * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * This program is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * This program is distributed WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html - * + * * You can contact Ascensio System SIA at 17-2 Elijas street, Riga, Latvia, EU, LV-1021. - * - * The interactive user interfaces in modified source and object code versions of the Program + * + * The interactive user interfaces in modified source and object code versions of the Program * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. - * - * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. + * + * Pursuant to Section 7(b) of the License you must retain the original Product logo when distributing the program. * Pursuant to Section 7(e) we decline to grant you any rights under trademark law for use of our trademarks. - * - * All the Product's GUI elements, including illustrations and icon sets, as well as technical - * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. + * + * All the Product's GUI elements, including illustrations and icon sets, as well as technical + * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International. * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ From 3ff9d1eb1db6c507cf0a449793ecdb27b7de1cd6 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 23 Jul 2018 15:59:23 +0300 Subject: [PATCH 21/33] healthcheck request --- controller/settingscontroller.php | 14 ++++++++++++++ lib/documentservice.php | 27 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index ee6eb81c..e6891243 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -241,6 +241,20 @@ private function checkDocServiceUrl() { return $e->getMessage(); } + try { + + $documentService = new DocumentService($this->trans, $this->config); + + $healthcheckResponse = $documentService->HealthcheckRequest(); + if (!$healthcheckResponse) { + throw new \Exception($this->trans->t("Bad healthcheck status")); + } + + } catch (\Exception $e) { + $this->logger->error("HealthcheckRequest on check error: " . $e->getMessage(), array("app" => $this->appName)); + return $e->getMessage(); + } + try { $documentService = new DocumentService($this->trans, $this->config); diff --git a/lib/documentservice.php b/lib/documentservice.php index 74e58f20..621b02cd 100644 --- a/lib/documentservice.php +++ b/lib/documentservice.php @@ -248,6 +248,33 @@ function ProcessConvServResponceError($errorCode) { throw new \Exception($errorMessage); } + /** + * Request health status + * + * @return boolean + */ + function HealthcheckRequest() { + + $documentServerUrl = $this->config->GetDocumentServerInternalUrl(false); + + if (empty($documentServerUrl)) { + throw new \Exception($this->trans->t("ONLYOFFICE app is not configured. Please contact admin")); + } + + $urlHealthcheck = $documentServerUrl . "healthcheck"; + + $opts = array("http" => array( + "timeout" => "60" + ) + ); + + if (($response = $this->Request($urlHealthcheck, $opts)) === FALSE) { + throw new \Exception ($this->trans->t("Bad Request or timeout error")); + } + + return $response === "true"; + } + /** * Send command * From 9949a4e95baa862fac6c7de9f319a9dd63828aa7 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 23 Jul 2018 17:45:39 +0300 Subject: [PATCH 22/33] Fixed #184 - redirect to login page --- controller/editorcontroller.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index eba86ba1..1e1b89d6 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -29,9 +29,10 @@ namespace OCA\Onlyoffice\Controller; -use OCP\AppFramework\Http\TemplateResponse; -use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\ContentSecurityPolicy; +use OCP\AppFramework\Http\RedirectResponse; +use OCP\AppFramework\Http\TemplateResponse; use OCP\AutoloadNotAllowedException; use OCP\Constants; use OCP\Files\FileInfo; @@ -324,15 +325,21 @@ public function convert($fileId) { * @param integer $fileId - file identifier * @param string $token - access token * - * @return TemplateResponse + * @return TemplateResponse|RedirectResponse * * @NoAdminRequired * @NoCSRFRequired - * @PublicPage */ public function index($fileId, $token = NULL) { $this->logger->debug("Open: " . $fileId, array("app" => $this->appName)); + if (empty($token) && !$this->userSession->isLoggedIn()) { + $redirectUrl = $this->urlGenerator->linkToRoute("core.login.showLoginForm", [ + "redirect_url" => $this->request->getRequestUri() + ]); + return new RedirectResponse($redirectUrl); + } + $documentServerUrl = $this->config->GetDocumentServerUrl(); if (empty($documentServerUrl)) { From 233f0df9cd1b65286059929fe921db4a1bf4010e Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 31 Jul 2018 13:06:57 +0300 Subject: [PATCH 23/33] Fixed #179 default action for all formats --- controller/settingscontroller.php | 10 +--------- templates/settings.php | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/controller/settingscontroller.php b/controller/settingscontroller.php index e6891243..39d3621b 100644 --- a/controller/settingscontroller.php +++ b/controller/settingscontroller.php @@ -113,21 +113,13 @@ public function __construct($AppName, * @return TemplateResponse */ public function index() { - $formats = $this->formats(); - $defFormats = array(); - foreach ($formats as $format => $setting) { - if (!array_key_exists("conv", $setting) || !$setting["conv"]) { - $defFormats[$format] = array_key_exists("def", $setting) && $setting["def"]; - } - } - $data = [ "documentserver" => $this->config->GetDocumentServerUrl(), "documentserverInternal" => $this->config->GetDocumentServerInternalUrl(true), "storageUrl" => $this->config->GetStorageUrl(), "secret" => $this->config->GetDocumentServerSecret(), "currentServer" => $this->urlGenerator->getAbsoluteURL("/"), - "defFormats" => $defFormats, + "formats" => $this->formats(), "sameTab" => $this->config->GetSameTab(), "encryption" => $this->checkEncryptionModule() ]; diff --git a/templates/settings.php b/templates/settings.php index 3e71e940..1dcfe3d4 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -67,12 +67,12 @@

t("The default application for opening the format")) ?>

- $setting) { ?> + $setting) { ?>

checked="checked" /> + checked="checked" />

From e0ef118bc897083068ab609238ca8bc8d6cdd4f7 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 31 Jul 2018 15:50:26 +0300 Subject: [PATCH 24/33] displaying a list of formats --- css/settings.css | 5 +++++ templates/settings.php | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/css/settings.css b/css/settings.css index e1a382ca..bda57aca 100644 --- a/css/settings.css +++ b/css/settings.css @@ -49,3 +49,8 @@ .onlyoffice-error { color: red; } +.onlyoffice-exts { + column-width: 100px; + -moz-column-width: 100px; + -webkit-column-width: 100px; +} diff --git a/templates/settings.php b/templates/settings.php index 1dcfe3d4..f9e99ec4 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -67,15 +67,17 @@

t("The default application for opening the format")) ?>

- $setting) { ?> -

- checked="checked" /> - -

- +
+ $setting) { ?> +
+ checked="checked" /> + +
+ +
t("Save")) ?> \ No newline at end of file From 96401967f26f8554fbfac30990dafe54877aae45 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 31 Jul 2018 15:50:45 +0300 Subject: [PATCH 25/33] sorting formats --- lib/appconfig.php | 66 +++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/appconfig.php b/lib/appconfig.php index c21e856a..07df837a 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -438,45 +438,45 @@ public function SettingsAreSuccessful() { * @var array */ public $formats = [ - "docx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "type" => "text", "edit" => true, "def" => true ], - "xlsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "type" => "spreadsheet", "edit" => true, "def" => true ], - "pptx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "type" => "presentation", "edit" => true, "def" => true ], - "ppsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "type" => "presentation", "edit" => true, "def" => true ], - "txt" => [ "mime" => "text/plain", "type" => "text", "edit" => true ], "csv" => [ "mime" => "text/csv", "type" => "spreadsheet", "edit" => true ], + "djvu" => [ "mime" => "image/vnd.djvu", "type" => "text" ], + "doc" => [ "mime" => "application/msword", "type" => "text", "conv" => true ], + "docm" => [ "mime" => "application/vnd.ms-word.document.macroEnabled.12", "type" => "text", "conv" => true ], + "docx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "type" => "text", "edit" => true, "def" => true ], "dot" => [ "mime" => "application/msword", "type" => "text", "conv" => true ], - "dotx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "type" => "text", "conv" => true ], "dotm" => [ "mime" => "application/vnd.ms-word.template.macroEnabled.12", "type" => "text", "conv" => true ], - "docm" => [ "mime" => "application/vnd.ms-word.document.macroEnabled.12", "type" => "text", "conv" => true ], - "xlsm" => [ "mime" => "application/vnd.ms-excel.sheet.macroEnabled.12", "type" => "spreadsheet", "conv" => true ], - "xlt" => [ "mime" => "application/excel", "type" => "spreadsheet", "conv" => true ], - "xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "spreadsheet", "conv" => true ], - "xltm" => [ "mime" => "application/vnd.ms-excel.template.macroEnabled.12", "type" => "spreadsheet", "conv" => true ], - "pptm" => [ "mime" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12", "type" => "presentation", "conv" => true ], - "ppsm" => [ "mime" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", "type" => "presentation", "conv" => true ], - "pot" => [ "mime" => "application/mspowerpoint", "type" => "presentation", "conv" => true ], - "potx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.template", "type" => "presentation", "conv" => true ], - "potm" => [ "mime" => "application/vnd.ms-powerpoint.template.macroEnabled.12", "type" => "presentation", "conv" => true ], - "odt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ], - "ods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ], + "dotx" => [ "mime" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "type" => "text", "conv" => true ], + "epub" => [ "mime" => "application/epub+zip", "type" => "text", "conv" => true ], + "fodp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ], + "fods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ], + "fodt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ], + "htm" => [ "mime" => "text/html", "type" => "text", "conv" => true ], + "html" => [ "mime" => "text/html", "type" => "text", "conv" => true ], + "mht" => [ "mime" => "message/rfc822", "conv" => true ], "odp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ], - "ott" => [ "mime" => "application/vnd.oasis.opendocument.text-template", "type" => "text", "conv" => true ], - "ots" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet-template", "type" => "spreadsheet", "conv" => true ], + "ods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ], + "odt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ], "otp" => [ "mime" => "application/vnd.oasis.opendocument.presentation-template", "type" => "presentation", "conv" => true ], - "fodt" => [ "mime" => "application/vnd.oasis.opendocument.text", "type" => "text", "conv" => true ], - "fods" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet", "type" => "spreadsheet", "conv" => true ], - "fodp" => [ "mime" => "application/vnd.oasis.opendocument.presentation", "type" => "presentation", "conv" => true ], - "doc" => [ "mime" => "application/msword", "type" => "text", "conv" => true ], - "xls" => [ "mime" => "application/vnd.ms-excel", "type" => "spreadsheet", "conv" => true ], - "ppt" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ], + "ots" => [ "mime" => "application/vnd.oasis.opendocument.spreadsheet-template", "type" => "spreadsheet", "conv" => true ], + "ott" => [ "mime" => "application/vnd.oasis.opendocument.text-template", "type" => "text", "conv" => true ], + "pdf" => [ "mime" => "application/pdf", "type" => "text" ], + "pot" => [ "mime" => "application/mspowerpoint", "type" => "presentation", "conv" => true ], + "potm" => [ "mime" => "application/vnd.ms-powerpoint.template.macroEnabled.12", "type" => "presentation", "conv" => true ], + "potx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.template", "type" => "presentation", "conv" => true ], "pps" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ], - "epub" => [ "mime" => "application/epub+zip", "type" => "text", "conv" => true ], + "ppsm" => [ "mime" => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", "type" => "presentation", "conv" => true ], + "ppsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "type" => "presentation", "edit" => true, "def" => true ], + "ppt" => [ "mime" => "application/vnd.ms-powerpoint", "type" => "presentation", "conv" => true ], + "pptm" => [ "mime" => "application/vnd.ms-powerpoint.presentation.macroEnabled.12", "type" => "presentation", "conv" => true ], + "pptx" => [ "mime" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", "type" => "presentation", "edit" => true, "def" => true ], "rtf" => [ "mime" => "text/rtf", "type" => "text", "conv" => true ], - "mht" => [ "mime" => "message/rfc822", "conv" => true ], - "html" => [ "mime" => "text/html", "type" => "text", "conv" => true ], - "htm" => [ "mime" => "text/html", "type" => "text", "conv" => true ], - "xps" => [ "mime" => "application/vnd.ms-xpsdocument", "type" => "text" ], - "pdf" => [ "mime" => "application/pdf", "type" => "text" ], - "djvu" => [ "mime" => "image/vnd.djvu", "type" => "text" ] + "txt" => [ "mime" => "text/plain", "type" => "text", "edit" => true ], + "xls" => [ "mime" => "application/vnd.ms-excel", "type" => "spreadsheet", "conv" => true ], + "xlsm" => [ "mime" => "application/vnd.ms-excel.sheet.macroEnabled.12", "type" => "spreadsheet", "conv" => true ], + "xlsx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "type" => "spreadsheet", "edit" => true, "def" => true ], + "xlt" => [ "mime" => "application/excel", "type" => "spreadsheet", "conv" => true ], + "xltm" => [ "mime" => "application/vnd.ms-excel.template.macroEnabled.12", "type" => "spreadsheet", "conv" => true ], + "xltx" => [ "mime" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "type" => "spreadsheet", "conv" => true ], + "xps" => [ "mime" => "application/vnd.ms-xpsdocument", "type" => "text" ] ]; } From b0354e5ee4f4dbc219226bab7a246835a5567e25 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 31 Jul 2018 17:02:18 +0300 Subject: [PATCH 26/33] splitting action to opening and converting --- js/main.js | 28 ++++++++++++++++++++-------- l10n/de.js | 1 + l10n/de.json | 1 + l10n/de_DE.js | 1 + l10n/de_DE.json | 1 + l10n/es.js | 1 + l10n/es.json | 1 + l10n/pt_BR.js | 1 + l10n/pt_BR.json | 1 + l10n/ru.js | 1 + l10n/ru.json | 1 + 11 files changed, 30 insertions(+), 8 deletions(-) diff --git a/js/main.js b/js/main.js index 3b6b3829..8bc9477f 100644 --- a/js/main.js +++ b/js/main.js @@ -95,13 +95,14 @@ } }; - OCA.Onlyoffice.FileClick = function (fileName, context, attr) { + OCA.Onlyoffice.FileClick = function (fileName, context) { + var fileInfoModel = context.fileInfoModel || context.fileList.getModelForFile(fileName); + OCA.Onlyoffice.OpenEditor(fileInfoModel.id); + }; + + OCA.Onlyoffice.FileConvertClick = function (fileName, context) { var fileInfoModel = context.fileInfoModel || context.fileList.getModelForFile(fileName); var fileList = context.fileList; - if (!attr.conv || (fileList.dirInfo.permissions & OC.PERMISSION_CREATE) !== OC.PERMISSION_CREATE || $("#isPublic").val()) { - OCA.Onlyoffice.OpenEditor(fileInfoModel.id); - return; - } OC.dialogs.confirm(t(OCA.Onlyoffice.AppName, "The document file you open will be converted to the Office Open XML format for faster viewing and editing."), t(OCA.Onlyoffice.AppName, "Convert and open document"), @@ -172,14 +173,25 @@ icon: function () { return OC.imagePath(OCA.Onlyoffice.AppName, "app-dark"); }, - actionHandler: function (fileName, context) { - OCA.Onlyoffice.FileClick(fileName, context, attr); - } + actionHandler: OCA.Onlyoffice.FileClick }); if (attr.def) { fileList.fileActions.setDefault(attr.mime, "onlyofficeOpen"); } + + if (attr.conv) { + fileList.fileActions.registerAction({ + name: "onlyofficeConvert", + displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"), + mime: attr.mime, + permissions: OC.PERMISSION_READ, + icon: function () { + return OC.imagePath(OCA.Onlyoffice.AppName, "app-dark"); + }, + actionHandler: OCA.Onlyoffice.FileConvertClick + }); + } }); } diff --git a/l10n/de.js b/l10n/de.js index 66bb60b6..e271d865 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -25,6 +25,7 @@ "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", "Convert and open document" : "Dokument konvertieren und öffnen", "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", + "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln", "Document" : "Dokument", "Spreadsheet" : "Tabelle", "Presentation" : "Präsentation", diff --git a/l10n/de.json b/l10n/de.json index 87094d41..723a42ea 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -23,6 +23,7 @@ "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", "Convert and open document" : "Dokument konvertieren und öffnen", "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", + "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln", "Document" : "Dokument", "Spreadsheet" : "Tabelle", "Presentation" : "Präsentation", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 360368c3..61c84713 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -25,6 +25,7 @@ OC.L10N.register( "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", "Convert and open document" : "Dokument konvertieren und öffnen", "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", + "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln", "Document" : "Dokument", "Spreadsheet" : "Tabelle", "Presentation" : "Präsentation", diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 2d7d9bd8..8b969604 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -23,6 +23,7 @@ "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", "Convert and open document" : "Dokument konvertieren und öffnen", "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", + "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln", "Document" : "Dokument", "Spreadsheet" : "Tabelle", "Presentation" : "Präsentation", diff --git a/l10n/es.js b/l10n/es.js index b630e420..934934e6 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -25,6 +25,7 @@ OC.L10N.register( "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "El archivo de documento que Usted abre será convertido en el formato Office Open XML para visualización y edición más rápida.", "Convert and open document" : "Convertir y abrir documento", "Open in ONLYOFFICE" : "Abrir en ONLYOFFICE", + "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE", "Document" : "Documento", "Spreadsheet" : "Hoja de cálculo", "Presentation" : "Presentación", diff --git a/l10n/es.json b/l10n/es.json index 972e145a..52204505 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -23,6 +23,7 @@ "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "El archivo de documento que Usted abre será convertido en el formato Office Open XML para visualización y edición más rápida.", "Convert and open document" : "Convertir y abrir documento", "Open in ONLYOFFICE" : "Abrir en ONLYOFFICE", + "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE", "Document" : "Documento", "Spreadsheet" : "Hoja de cálculo", "Presentation" : "Presentación", diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 580207ee..7b3fa66b 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -25,6 +25,7 @@ OC.L10N.register( "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "O documento será convertido para o formato Office Open XML para melhor edição e visualização.", "Convert and open document" : "Converter e abrir o documento", "Open in ONLYOFFICE" : "Abrir no ONLYOFFICE", + "Convert with ONLYOFFICE" : "Converta com ONLYOFFICE", "Document" : "Documento", "Spreadsheet" : "Planilha", "Presentation" : "Apresentação", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 943df085..706678a7 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -23,6 +23,7 @@ "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "O documento será convertido para o formato Office Open XML para melhor edição e visualização.", "Convert and open document" : "Converter e abrir o documento", "Open in ONLYOFFICE" : "Abrir no ONLYOFFICE", + "Convert with ONLYOFFICE" : "Converta com ONLYOFFICE", "Document" : "Documento", "Spreadsheet" : "Planilha", "Presentation" : "Apresentação", diff --git a/l10n/ru.js b/l10n/ru.js index f5105c25..ba3c3ee7 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -25,6 +25,7 @@ OC.L10N.register( "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Открываемый файл документа будет преобразован в формат Office Open XML для быстрого просмотра и редактирования.", "Convert and open document" : "Преобразовать и открыть документ", "Open in ONLYOFFICE" : "Открыть в ONLYOFFICE", + "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE", "Document" : "Документ", "Spreadsheet" : "Электронная таблица", "Presentation" : "Презентация", diff --git a/l10n/ru.json b/l10n/ru.json index 395357f6..498f3163 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -23,6 +23,7 @@ "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Открываемый файл документа будет преобразован в формат Office Open XML для быстрого просмотра и редактирования.", "Convert and open document" : "Преобразовать и открыть документ", "Open in ONLYOFFICE" : "Открыть в ONLYOFFICE", + "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE", "Document" : "Документ", "Spreadsheet" : "Электронная таблица", "Presentation" : "Презентация", From 17d48808caf56389169580859d3558af01d490c5 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 31 Jul 2018 17:11:53 +0300 Subject: [PATCH 27/33] remove confirmation dialog --- js/main.js | 45 ++++++++++++++++++--------------------------- l10n/de.js | 2 -- l10n/de.json | 2 -- l10n/de_DE.js | 2 -- l10n/de_DE.json | 2 -- l10n/es.js | 2 -- l10n/es.json | 2 -- l10n/pt_BR.js | 2 -- l10n/pt_BR.json | 2 -- l10n/ru.js | 2 -- l10n/ru.json | 2 -- 11 files changed, 18 insertions(+), 47 deletions(-) diff --git a/js/main.js b/js/main.js index 8bc9477f..9d774f43 100644 --- a/js/main.js +++ b/js/main.js @@ -104,36 +104,27 @@ var fileInfoModel = context.fileInfoModel || context.fileList.getModelForFile(fileName); var fileList = context.fileList; - OC.dialogs.confirm(t(OCA.Onlyoffice.AppName, "The document file you open will be converted to the Office Open XML format for faster viewing and editing."), - t(OCA.Onlyoffice.AppName, "Convert and open document"), - function (convert) { - if (!convert) { - OCA.Onlyoffice.OpenEditor(fileInfoModel.id); + $.post(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/convert"), + { + fileId: fileInfoModel.id + }, + function onSuccess(response) { + if (response.error) { + var row = OC.Notification.show(response.error); + setTimeout(function () { + OC.Notification.hide(row); + }, 3000); return; } - $.post(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/convert"), - { - fileId: fileInfoModel.id - }, - function onSuccess(response) { - if (response.error) { - var row = OC.Notification.show(response.error); - setTimeout(function () { - OC.Notification.hide(row); - }, 3000); - return; - } - - if (response.parentId == fileList.dirInfo.id) { - fileList.add(response, { animate: true }); - } - - var row = OC.Notification.show(t(OCA.Onlyoffice.AppName, "File created")); - setTimeout(function () { - OC.Notification.hide(row); - }, 3000); - }); + if (response.parentId == fileList.dirInfo.id) { + fileList.add(response, { animate: true }); + } + + var row = OC.Notification.show(t(OCA.Onlyoffice.AppName, "File created")); + setTimeout(function () { + OC.Notification.hide(row); + }, 3000); }); }; diff --git a/l10n/de.js b/l10n/de.js index e271d865..99905c93 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -22,8 +22,6 @@ "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wende Dich an Deinen Administrator", "Loading, please wait." : "Laden... Bitte warten.", "File created" : "Erstellte Datei", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", - "Convert and open document" : "Dokument konvertieren und öffnen", "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln", "Document" : "Dokument", diff --git a/l10n/de.json b/l10n/de.json index 723a42ea..bf6bd416 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -20,8 +20,6 @@ "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wende Dich an Deinen Administrator", "Loading, please wait." : "Laden... Bitte warten.", "File created" : "Erstellte Datei", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", - "Convert and open document" : "Dokument konvertieren und öffnen", "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln", "Document" : "Dokument", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index 61c84713..5538e9e9 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -22,8 +22,6 @@ OC.L10N.register( "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator", "Loading, please wait." : "Laden... Bitte warten.", "File created" : "Erstellte Datei", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", - "Convert and open document" : "Dokument konvertieren und öffnen", "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln", "Document" : "Dokument", diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 8b969604..3f126251 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -20,8 +20,6 @@ "ONLYOFFICE not reached. Please contact admin" : "ONLYOFFICE ist zurzeit nicht erreichbar. Bitte wenden Sie sich an Ihren Administrator", "Loading, please wait." : "Laden... Bitte warten.", "File created" : "Erstellte Datei", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Das aktuell geöffnete Dokument wird in ein Office Open XML Dateiformat für schnellere Ansicht und Bearbeitung konvertiert.", - "Convert and open document" : "Dokument konvertieren und öffnen", "Open in ONLYOFFICE" : "In ONLYOFFICE öffnen", "Convert with ONLYOFFICE" : "Mit ONLYOFFICE umwandeln", "Document" : "Dokument", diff --git a/l10n/es.js b/l10n/es.js index 934934e6..ce0b5563 100644 --- a/l10n/es.js +++ b/l10n/es.js @@ -22,8 +22,6 @@ OC.L10N.register( "ONLYOFFICE cannot be reached. Please contact admin" : "No se puede acceder al ONLYOFFICE. Por favor, contacte con admin", "Loading, please wait." : "Cargando, espere, por favor.", "File created" : "Archivo creado", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "El archivo de documento que Usted abre será convertido en el formato Office Open XML para visualización y edición más rápida.", - "Convert and open document" : "Convertir y abrir documento", "Open in ONLYOFFICE" : "Abrir en ONLYOFFICE", "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE", "Document" : "Documento", diff --git a/l10n/es.json b/l10n/es.json index 52204505..3ac89add 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -20,8 +20,6 @@ "ONLYOFFICE cannot be reached. Please contact admin" : "No se puede acceder al ONLYOFFICE. Por favor, contacte con admin", "Loading, please wait." : "Cargando, espere, por favor.", "File created" : "Archivo creado", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "El archivo de documento que Usted abre será convertido en el formato Office Open XML para visualización y edición más rápida.", - "Convert and open document" : "Convertir y abrir documento", "Open in ONLYOFFICE" : "Abrir en ONLYOFFICE", "Convert with ONLYOFFICE" : "Convertir con ONLYOFFICE", "Document" : "Documento", diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index 7b3fa66b..0910c031 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -22,8 +22,6 @@ OC.L10N.register( "ONLYOFFICE cannot be reached. Please contact admin" : "Não foi possível conectar ao ONLYOFFICE. Favor contatar o administrador.", "Loading, please wait." : "Carregando, por favor aguarde.", "File created" : "Arquivo criado", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "O documento será convertido para o formato Office Open XML para melhor edição e visualização.", - "Convert and open document" : "Converter e abrir o documento", "Open in ONLYOFFICE" : "Abrir no ONLYOFFICE", "Convert with ONLYOFFICE" : "Converta com ONLYOFFICE", "Document" : "Documento", diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 706678a7..fd294aa1 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -20,8 +20,6 @@ "ONLYOFFICE cannot be reached. Please contact admin" : "Não foi possível conectar ao ONLYOFFICE. Favor contatar o administrador.", "Loading, please wait." : "Carregando, por favor aguarde.", "File created" : "Arquivo criado", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "O documento será convertido para o formato Office Open XML para melhor edição e visualização.", - "Convert and open document" : "Converter e abrir o documento", "Open in ONLYOFFICE" : "Abrir no ONLYOFFICE", "Convert with ONLYOFFICE" : "Converta com ONLYOFFICE", "Document" : "Documento", diff --git a/l10n/ru.js b/l10n/ru.js index ba3c3ee7..1289d5f4 100644 --- a/l10n/ru.js +++ b/l10n/ru.js @@ -22,8 +22,6 @@ OC.L10N.register( "ONLYOFFICE cannot be reached. Please contact admin" : "Приложение ONLYOFFICE недоступно. Пожалуйста, свяжитесь с администратором", "Loading, please wait." : "Загрузка. Пожалуйста, подождите.", "File created" : "Файл создан", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Открываемый файл документа будет преобразован в формат Office Open XML для быстрого просмотра и редактирования.", - "Convert and open document" : "Преобразовать и открыть документ", "Open in ONLYOFFICE" : "Открыть в ONLYOFFICE", "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE", "Document" : "Документ", diff --git a/l10n/ru.json b/l10n/ru.json index 498f3163..dd931cf6 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -20,8 +20,6 @@ "ONLYOFFICE cannot be reached. Please contact admin" : "Приложение ONLYOFFICE недоступно. Пожалуйста, свяжитесь с администратором", "Loading, please wait." : "Загрузка. Пожалуйста, подождите.", "File created" : "Файл создан", - "The document file you open will be converted to the Office Open XML format for faster viewing and editing." : "Открываемый файл документа будет преобразован в формат Office Open XML для быстрого просмотра и редактирования.", - "Convert and open document" : "Преобразовать и открыть документ", "Open in ONLYOFFICE" : "Открыть в ONLYOFFICE", "Convert with ONLYOFFICE" : "Конвертировать в ONLYOFFICE", "Document" : "Документ", From d0cffdeaa5719b6f10afda88d760476dad50a1b0 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 2 Aug 2018 11:10:07 +0300 Subject: [PATCH 28/33] Revert "Fixed #88 - limit access to groups" This reverts commit 033ba998dc83b2ca48d0e7b0ae318e7e9469f998. --- appinfo/info.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appinfo/info.xml b/appinfo/info.xml index d3750b97..e3025e4a 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,6 +9,9 @@ Ascensio System SIA 1.3.0 Onlyoffice + + + https://api.onlyoffice.com/editors/owncloud https://api.onlyoffice.com/editors/owncloud From 76fc340b5a09a829ef1c319cee77cd40eac1ea36 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 13 Aug 2018 11:56:36 +0300 Subject: [PATCH 29/33] fix opening from shared folder --- controller/editorcontroller.php | 4 ++-- js/editor.js | 2 +- js/main.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 1e1b89d6..76ae1a48 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -380,8 +380,8 @@ public function index($fileId, $token = NULL) { * @NoCSRFRequired * @PublicPage */ - public function PublicPage($token) { - return $this->index(0, $token); + public function PublicPage($fileId, $token) { + return $this->index($fileId, $token); } /** diff --git a/js/editor.js b/js/editor.js index 517027d1..dee29c11 100644 --- a/js/editor.js +++ b/js/editor.js @@ -53,7 +53,7 @@ } $.ajax({ - url: OC.generateUrl("apps/onlyoffice/ajax/config/" + fileId + (fileToken ? "?token=" + encodeURIComponent(fileToken) : "")), + url: OC.generateUrl("apps/onlyoffice/ajax/config/" + (fileId || 0) + (fileToken ? "?token=" + encodeURIComponent(fileToken) : "")), success: function onSuccess(config) { if (config) { if (config.error != null) { diff --git a/js/main.js b/js/main.js index 9d774f43..14927966 100644 --- a/js/main.js +++ b/js/main.js @@ -83,7 +83,7 @@ }); if ($("#isPublic").val()) { - url += "?token=" + encodeURIComponent($("#sharingToken").val()); + url = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/" + encodeURIComponent($("#sharingToken").val())) + "?fileId=" + fileId; } if (winEditor && winEditor.location) { From 298d6e76cb0c0048dbc721b850fca8061ff4c5ae Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Mon, 13 Aug 2018 12:02:32 +0300 Subject: [PATCH 30/33] hide conversion in shared folder --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 14927966..e87de710 100644 --- a/js/main.js +++ b/js/main.js @@ -171,7 +171,7 @@ fileList.fileActions.setDefault(attr.mime, "onlyofficeOpen"); } - if (attr.conv) { + if (!$("#isPublic").val() && attr.conv) { fileList.fileActions.registerAction({ name: "onlyofficeConvert", displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"), From 24126aaa1bb2e8e3f4cc508906bc5d798a9f2f20 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 14 Aug 2018 12:02:04 +0300 Subject: [PATCH 31/33] opening from shared folder without access --- controller/callbackcontroller.php | 10 +++++++++- controller/editorcontroller.php | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index 9785e6b3..e2c22e14 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -43,6 +43,7 @@ use OCP\IRequest; use OCP\IUserManager; use OCP\IUserSession; +use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; use OCA\Onlyoffice\AppConfig; @@ -489,7 +490,14 @@ private function getShare($token) { return [NULL, $this->trans->t("FileId is empty")]; } - $share = $this->shareManager->getShareByToken($token); + $share; + try { + $share = $this->shareManager->getShareByToken($token); + } catch (ShareNotFound $e) { + $this->logger->error("getShare error: " . $e->getMessage(), array("app" => $this->appName)); + $share = NULL; + } + if ($share === NULL || $share === false) { return [NULL, $this->trans->t("You do not have enough permissions to view the file")]; } diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 76ae1a48..4d02c598 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -44,6 +44,7 @@ use OCP\ISession; use OCP\IURLGenerator; use OCP\IUserSession; +use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; use OC\Files\Filesystem; @@ -564,7 +565,14 @@ private function getShare($token) { return [NULL, $this->trans->t("FileId is empty")]; } - $share = $this->shareManager->getShareByToken($token); + $share; + try { + $share = $this->shareManager->getShareByToken($token); + } catch (ShareNotFound $e) { + $this->logger->error("getShare error: " . $e->getMessage(), array("app" => $this->appName)); + $share = NULL; + } + if ($share === NULL || $share === false) { return [NULL, $this->trans->t("You do not have enough permissions to view the file")]; } From 9b51db750b0c6f1895bf2ebe6f8263f600a3f833 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 14 Aug 2018 12:58:06 +0300 Subject: [PATCH 32/33] opening from deleted shared folder --- controller/callbackcontroller.php | 8 +++++++- controller/editorcontroller.php | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/controller/callbackcontroller.php b/controller/callbackcontroller.php index e2c22e14..14ce9f3a 100644 --- a/controller/callbackcontroller.php +++ b/controller/callbackcontroller.php @@ -37,6 +37,7 @@ use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; +use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; use OCP\IL10N; use OCP\ILogger; @@ -467,7 +468,12 @@ private function getFileByToken($fileId, $token) { return [NULL, $error]; } - $node = $share->getNode(); + try { + $node = $share->getNode(); + } catch (NotFoundException $e) { + $this->logger->error("getFileByToken error: " . $e->getMessage(), array("app" => $this->appName)); + return [NULL, $this->trans->t("File not found")]; + } if ($node instanceof Folder) { $file = $node->getById($fileId)[0]; diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 4d02c598..de03e26c 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -38,6 +38,7 @@ use OCP\Files\FileInfo; use OCP\Files\Folder; use OCP\Files\IRootFolder; +use OCP\Files\NotFoundException; use OCP\IL10N; use OCP\ILogger; use OCP\IRequest; @@ -542,7 +543,12 @@ private function getFileByToken($fileId, $token) { return [NULL, $this->trans->t("You do not have enough permissions to view the file")]; } - $node = $share->getNode(); + try { + $node = $share->getNode(); + } catch (NotFoundException $e) { + $this->logger->error("getFileByToken error: " . $e->getMessage(), array("app" => $this->appName)); + return [NULL, $this->trans->t("File not found")]; + } if ($node instanceof Folder) { $file = $node->getById($fileId)[0]; From 6863a2dcbf16aa36f5b7b5bd27b8778f8ca44ca5 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 14 Aug 2018 13:54:46 +0300 Subject: [PATCH 33/33] 1.4.0 --- CHANGELOG.md | 12 ++++++++++++ appinfo/info.xml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a79cf804..9fe4aad5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log +## 1.4.0 +## Added +- transition from the editor to the list of files in the same tab +- default action for all supported formats +- redirect to the login page if are not logged in +- a separate action to call the file conversion + +## Changed +- improved checks when saving connection settings +- expanded the list of formats +- fixed exceptions when opening file shared by link + ## 1.3.0 ## Added - add macro-enabled and template formats diff --git a/appinfo/info.xml b/appinfo/info.xml index e3025e4a..8c41b309 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -7,7 +7,7 @@ ONLYOFFICE connector enables you to edit Office documents within ONLYOFFICE from the familiar web interface. This will create a new Open in ONLYOFFICE action within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to your file storage. agpl Ascensio System SIA - 1.3.0 + 1.4.0 Onlyoffice