Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ dist/
vendor/
.gh_token
*.min.*
*.cache
32 changes: 13 additions & 19 deletions composer.lock

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff downgrades sebastian/diff from 6.0.2 (PHP >=8.2, dev-requires phpunit/phpunit ^11.0) to 4.0.6 (PHP >=7.3, dev-requires phpunit/phpunit ^9.3), alongside an unrelated phpstan/phpstan patch bump. This looks like stale lockfile drift from an out-of-sync branch rather than an intentional change for this feature. Suggest regenerating the lockfile with a clean composer update against current composer.json before merge.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions front/container.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@
} elseif (isset($_POST['update_fields_values'])) {
$right = PluginFieldsProfile::getRightOnContainer($_SESSION['glpiactiveprofile']['id'], $_POST['plugin_fields_containers_id']);
if ($right > READ) {
$containerID = $_POST['plugin_fields_containers_id'];
$data = [];
foreach ($_REQUEST as $key => $value) {
// if key starts with plugin_fields_<containerID>_ remove the prefix
if (strpos($key, "plugin_fields_{$containerID}_") === 0) {
$new_key = substr($key, strlen("plugin_fields_{$containerID}_"));
$data[$new_key] = $value;
} else {
$data[$key] = $value;
}
}
$container->updateFieldsValues($_REQUEST, $_REQUEST['itemtype'], false);
Comment on lines +60 to 71

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$data is computed but never used?!

}
Html::back();
Expand Down
Loading