Skip to content

Commit

Permalink
Merge pull request #506 from ONLYOFFICE/develop
Browse files Browse the repository at this point in the history
Release/7.1.2
  • Loading branch information
LinneyS authored Aug 5, 2021
2 parents ae76204 + 4833161 commit d7cdf80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 7.1.2
## Changed
- fix editing from mobile app

## 7.1.0
## Added
- mentions in comments
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.</description>
<licence>apache</licence>
<author mail="[email protected]" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author>
<version>7.1.0</version>
<version>7.1.2</version>
<namespace>Onlyoffice</namespace>
<types>
<filesystem/>
Expand Down
7 changes: 4 additions & 3 deletions controller/editorcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ public function config($fileId, $filePath = null, $shareToken = null, $directTok
}

if (!$template) {
$params["document"]["info"]["favorite"] = $this->isFavorite($fileId);
$params["document"]["info"]["favorite"] = $this->isFavorite($fileId, $userId);
}
$params["_file_path"] = $userFolder->getRelativePath($file->getPath());
}
Expand Down Expand Up @@ -1631,11 +1631,12 @@ private function getWatermarkText($isPublic, $userId, $file, $canEdit, $canDownl
* Check file favorite
*
* @param integer $fileId - file identifier
* @param string $userId - user identifier
*
* @return bool
*/
private function isFavorite($fileId) {
$currentTags = $this->tagManager->load("files")->getTagsForObjects([$fileId]);
private function isFavorite($fileId, $userId = null) {
$currentTags = $this->tagManager->load("files", [], false, $userId)->getTagsForObjects([$fileId]);
if ($currentTags) {
return in_array(ITags::TAG_FAVORITE, $currentTags[$fileId]);
}
Expand Down

0 comments on commit d7cdf80

Please sign in to comment.