diff options
author | Simon Rettberg | 2022-07-04 15:42:13 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-07-04 15:42:13 +0200 |
commit | 878dbac85a9f684916e2d30cab4782e21a03e767 (patch) | |
tree | e4e8edc6e61b10c1f6bc15f12a1d9c09677a3103 /modules-available/rebootcontrol | |
parent | Fix typos (diff) | |
download | slx-admin-878dbac85a9f684916e2d30cab4782e21a03e767.tar.gz slx-admin-878dbac85a9f684916e2d30cab4782e21a03e767.tar.xz slx-admin-878dbac85a9f684916e2d30cab4782e21a03e767.zip |
[rebootcontrol/main] Add subkey column to property_list table
This makes it easier to reference to list entries that have non-trivial
data values, e.g. long json data.
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r-- | modules-available/rebootcontrol/inc/rebootcontrol.inc.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php index 36b2b14f..83513081 100644 --- a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php +++ b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php @@ -105,10 +105,10 @@ class RebootControl } $list = Property::getList(RebootControl::KEY_TASKLIST); $return = []; - foreach ($list as $entry) { + foreach ($list as $subkey => $entry) { $p = json_decode($entry, true); if (!is_array($p) || !isset($p['id'])) { - Property::removeFromList(RebootControl::KEY_TASKLIST, $entry); + Property::removeFromListByKey(RebootControl::KEY_TASKLIST, $subkey); continue; } if (is_array($locations) && is_array($p['locations']) && array_diff($p['locations'], $locations) !== []) @@ -131,7 +131,7 @@ class RebootControl } } if (!$valid) { - Property::removeFromList(RebootControl::KEY_TASKLIST, $entry); + Property::removeFromListByKey(RebootControl::KEY_TASKLIST, $subkey); continue; } $return[] = $p; |