Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix inheritance of bloquer_creation and bloquer_modification settings for subfolders (issue #1634) #1635

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions sources/folders.queries.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,13 @@
if ($createNewFolder == true) {
//check if parent folder is personal
$data = DB::queryfirstrow(
"SELECT personal_folder
"SELECT personal_folder, bloquer_creation, bloquer_modification
FROM ".prefix_table("nested_tree")."
WHERE id = %i",
$parentId
);
$parentBloquerCreation = $data['bloquer_creation'];
$parentBloquerModification = $data['bloquer_modification'];
if ($data['personal_folder'] === "1") {
$isPersonal = 1;
} else {
Expand Down Expand Up @@ -417,8 +419,8 @@
'title' => $title,
'personal_folder' => $isPersonal,
'renewal_period' => $renewalPeriod,
'bloquer_creation' => isset($dataReceived['block_creation']) && $dataReceived['block_creation'] == 1 ? '1' : '0',
'bloquer_modification' => isset($dataReceived['block_modif']) && $dataReceived['block_modif'] == 1 ? '1' : '0'
'bloquer_creation' => isset($dataReceived['block_creation']) && $dataReceived['block_creation'] == 1 ? '1' : $parentBloquerCreation,
'bloquer_modification' => isset($dataReceived['block_modif']) && $dataReceived['block_modif'] == 1 ? '1' : $parentBloquerModification
)
);
$newId = DB::insertId();
Expand Down