Skip to content

Commit

Permalink
2.1.27
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
nilsteampassnet authored and nilsteampassnet committed May 24, 2018
1 parent fd4112b commit d487a0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions sources/folders.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

require_once 'SecureHandler.php';
session_start();
if (!isset($_SESSION['CPM']) || $_SESSION['CPM'] != 1 ||
!isset($_SESSION['user_id']) || empty($_SESSION['user_id']) ||
!isset($_SESSION['key']) || empty($_SESSION['key'])
if (isset($_SESSION['CPM']) === false || $_SESSION['CPM'] != 1
|| isset($_SESSION['user_id']) === false || empty($_SESSION['user_id']) === true
|| isset($_SESSION['key']) === false || empty($_SESSION['key']) === true
) {
die('Hacking attempt...');
}
Expand Down Expand Up @@ -1092,7 +1092,7 @@
// Then use the creator ones
if ($nodeInfo->personal_folder !== 1
&& isset($SETTINGS['subfolder_rights_as_parent']) === true
&& $SETTINGS['subfolder_rights_as_parent'] === "0"
&& $SETTINGS['subfolder_rights_as_parent'] === "1"
&& $_SESSION['is_admin'] !== 0
) {
//add access to this new folder
Expand Down
10 changes: 7 additions & 3 deletions sources/items.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -3174,9 +3174,13 @@
);

// check if user can perform this action
if (null !== $post_context && empty($post_context) === false) {
if ($post_context === "create_folder" || $post_context === "edit_folder"
|| $post_context === "delete_folder" || $post_context === "copy_folder"
if (null !== $post_context
&& empty($post_context) === false
) {
if ($post_context === "create_folder"
|| $post_context === "edit_folder"
|| $post_context === "delete_folder"
|| $post_context === "copy_folder"
) {
if ($_SESSION['is_admin'] !== '1'
&& ($_SESSION['user_manager'] !== '1')
Expand Down

0 comments on commit d487a0b

Please sign in to comment.