Commit graph

10 commits

Author SHA1 Message Date
Johannes Meyer
10895f94f8 CustomvarFlat: Do not ignore source paths with a zero
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled
PHP evaluates `"0"` to false…
2026-05-27 17:10:40 +02:00
Sukhwinder Dhillon
75d4d13c73 CustomvarFlat: Fix path splitting for special chars and bracket notation
Two issues were fixed in the split regex:

1. Special characters before `.` were ignored:
The old regex only split on `.` when directly preceded by a word
character (\w), causing splits to be missed when `.` was preceded
by special characters like whitespace, / or $.
Result before: `foo /.bar.one` => `['foo /.bar', 'one']`
Result after: `foo /.bar.one` => `['foo /', 'bar', 'one']`

2. Brackets mid-word were incorrectly split:
The old regex split before any `[`, causing keys like `con[0]cat` to be
split incorrectly.
Resulti before: `con[0]cat` => `['con', '[0]cat']`
Now splits before `[` only when it's a standalone array index — meaning
`]` is followed by `.`, another `[`, or end of string.
Result after: `con[0]cat` => `['con', '[0]', 'cat']`
2026-05-21 15:52:42 +02:00
Eric Lippmann
272e791390 License source files as GPL-3.0-or-later
Add SPDX license headers and mark source files as GPL-3.0-or-later to
preserve the option to relicense under later GPL versions.
2026-03-11 14:03:05 +01:00
Sukhwinder Dhillon
279839d9da Align coding style to comply with latest PSR 2025-12-15 16:06:44 +01:00
Johannes Meyer
0148f4f510 db: Use an alias for *_customvar through tables
fixes #1162
2025-07-14 15:47:45 +02:00
Johannes Meyer
c57298e776 test: Make sure a backend exists 2024-12-17 16:33:05 +01:00
Johannes Meyer
83af168936 FlattenedObjectVars: Force processing to finish early
fixes #1001
2024-03-26 17:04:36 +01:00
Johannes Meyer
018d45f629 Transform custom variable filters as late as possible
fixes #865
2024-03-22 15:04:32 +01:00
Yonas Habteab
0f380c8411 Don't use customvar values from customvar table other than for empty array & dictionary 2023-10-13 09:02:01 +02:00
Johannes Meyer
ca57b19ec1 test: Add case for Icinga\Module\Icingadb\Model\CustomvarFlat 2023-07-05 14:05:53 +02:00