From 611ce2d856863d6b4c7acc264a72119aa1cb12db Mon Sep 17 00:00:00 2001 From: Marco Dickert Date: Mon, 6 Feb 2017 14:39:30 +0100 Subject: [PATCH] fix inheritance for bloquer_creation and bloquer_modification for subfolders (issue #1634) --- sources/folders.queries.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 sources/folders.queries.php diff --git a/sources/folders.queries.php b/sources/folders.queries.php old mode 100644 new mode 100755 index ea6846802..a23487091 --- a/sources/folders.queries.php +++ b/sources/folders.queries.php @@ -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 { @@ -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();