From 021d11af7b5b5291595fe8e36376c5e200c1f96c Mon Sep 17 00:00:00 2001 From: nilsteampassnet Date: Fri, 20 Sep 2024 19:56:50 +0200 Subject: [PATCH] 3.1.2 Merged PRs: #4345, #4348, #4347, #4343, #4342, #4341, #4340, #4339, #4338, #4337, #4336, #4335 --- includes/config/include.php | 2 +- includes/tables_integrity.json | 4 ++-- pages/folders.js.php | 3 ++- pages/roles.js.php | 2 +- sources/folders.queries.php | 6 +++++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/includes/config/include.php b/includes/config/include.php index 9be23e9d1..d4955949e 100755 --- a/includes/config/include.php +++ b/includes/config/include.php @@ -28,7 +28,7 @@ define('TP_VERSION', '3.1.2'); define("UPGRADE_MIN_DATE", "1724862801"); -define('TP_VERSION_MINOR', '87'); +define('TP_VERSION_MINOR', '88'); define('TP_TOOL_NAME', 'Teampass'); define('TP_ONE_DAY_SECONDS', 86400); define('TP_ONE_WEEK_SECONDS', 604800); diff --git a/includes/tables_integrity.json b/includes/tables_integrity.json index 516ae78be..c9dc270c8 100644 --- a/includes/tables_integrity.json +++ b/includes/tables_integrity.json @@ -17,7 +17,7 @@ }, { "table_name": "background_tasks_logs", - "structure_hash": "8eb5125b4bca94d47e159bd25613e75395a308f8c3b944f7ce7da16bfdf37fd0" + "structure_hash": "8050422b9d72cfe39e21afbaaaec36acc4608b336a535edab481cb8dbd6909bc" }, { "table_name": "cache", @@ -101,7 +101,7 @@ }, { "table_name": "log_system", - "structure_hash": "cc006a2c8103e056a09321d952742d93b707dc247dd53f97d352c2df94fca56a" + "structure_hash": "9b7f7260f6f5f9f86cdaee8135d56e1cf326368f90fd995ba1d977274080ba4a" }, { "table_name": "misc", diff --git a/pages/folders.js.php b/pages/folders.js.php index b2276ba6d..f301bf8c6 100755 --- a/pages/folders.js.php +++ b/pages/folders.js.php @@ -761,6 +761,7 @@ function(data) { $('#folder-edit-parent').val(folderParent).change(); $('#folder-edit-complexity').val(folderComplexity).change(); + $('#folder-edit-renewal').val(folderRenewal).change(); currentFolderEdited = ''; }); @@ -791,7 +792,7 @@ function(data) { 'title': purifyRes.arrFields['title'], //$('#folder-edit-title').val(), 'parentId': $('#folder-edit-parent').val(), 'complexity': $('#folder-edit-complexity').val(), - 'renewalPeriod': $('#new-renewal').val() === '' ? 0 : parseInt($('#new-renewal').val()), + 'renewalPeriod': $('#folder-edit-renewal').val() === '' ? 0 : parseInt($('#folder-edit-renewal').val()), 'addRestriction': $('#folder-edit-add-restriction').prop("checked") === true ? 1 : 0, 'editRestriction': $('#folder-edit-edit-restriction').prop("checked") === true ? 1 : 0, 'icon': purifyRes.arrFields['icon'], //$('#folder-edit-icon').val(), diff --git a/pages/roles.js.php b/pages/roles.js.php index 9cf9e61b2..9748ff848 100755 --- a/pages/roles.js.php +++ b/pages/roles.js.php @@ -257,7 +257,7 @@ function(data) { $('.infotip').tooltip(); // Adapt select - $('#folders-depth').val('').change(); + $('#folders-depth').empty().change(); $('#folders-depth').append(''); for (x = 1; x < max_folder_depth; x++) { $('#folders-depth').append(''); diff --git a/sources/folders.queries.php b/sources/folders.queries.php index f9172c9a8..8b4b023b4 100755 --- a/sources/folders.queries.php +++ b/sources/folders.queries.php @@ -191,7 +191,11 @@ $arrayColumns['folderComplexity'] = ''; } - $arrayColumns['renewalPeriod'] = (int) is_null($node_data) === false ? $node_data['renewal_period'] : 0; + if (is_null($node_data)=== false) { + $arrayColumns['renewalPeriod'] = (int) $node_data['renewal_period']; + } else { + $arrayColumns['renewalPeriod']=0; + } //col7 $data7 = DB::queryFirstRow(