Skip to content

Commit

Permalink
Merge pull request #911 from ONLYOFFICE/hotfix/advanced-tab
Browse files Browse the repository at this point in the history
Hotfix/advanced tab
  • Loading branch information
LinneyS authored Dec 5, 2023
2 parents 7b19fe8 + 0533082 commit 42bd2cd
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 165 deletions.
6 changes: 3 additions & 3 deletions lib/ExtraPermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ private function validation($share, $checkExtra, $wasInit = true) {

if (($share->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE) {
if (isset($format["modifyFilter"]) && $format["modifyFilter"]
&& ($checkExtra & self::Comment) !== self::Comment) {
&& ($checkExtra & self::COMMENT) !== self::COMMENT) {
$availableExtra |= self::MODIFYFILTER;
$defaultExtra |= self::MODIFYFILTER;
}
Expand All @@ -429,8 +429,8 @@ private function validation($share, $checkExtra, $wasInit = true) {
}

if (!$wasInit) {
if (($defaultExtra & self::ModifyFilter) === self::ModifyFilter) {
$availableExtra ^= self::Comment;
if (($defaultExtra & self::MODIFYFILTER) === self::MODIFYFILTER) {
$availableExtra ^= self::COMMENT;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"devDependencies": {
"@nextcloud/webpack-vue-config": "^6.0.0",
"@nextcloud/browserslist-config": "^3.0.0"
"@nextcloud/browserslist-config": "^3.0.0",
"raw-loader": "^4.0.2"
}
}
10 changes: 0 additions & 10 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,6 @@
}
};

OCA.Onlyoffice.TabView = {
attach(fileList) {
if (OCA.Onlyoffice.SharingTabView) {
fileList.registerTabView(new OCA.Onlyoffice.SharingTabView())
}
}
}

OCA.Onlyoffice.getFileExtension = function (fileName) {
var extension = fileName.substr(fileName.lastIndexOf(".") + 1).toLowerCase();
return extension;
Expand Down Expand Up @@ -549,8 +541,6 @@
} else {
OC.Plugins.register("OCA.Files.NewFileMenu", OCA.Onlyoffice.NewFileMenu);

OC.Plugins.register("OCA.Files.FileList", OCA.Onlyoffice.TabView);

OCA.Onlyoffice.registerAction();

OCA.Onlyoffice.bindVersionClick();
Expand Down
Loading

0 comments on commit 42bd2cd

Please sign in to comment.