mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 00:34:05 +02:00
Basket: drop protectedFormerChosenObjects
This commit is contained in:
parent
628f24d3d3
commit
d3625e807d
@ -25,8 +25,6 @@ class Basket extends DbObject implements ExportInterface
|
|||||||
|
|
||||||
protected $chosenObjects = [];
|
protected $chosenObjects = [];
|
||||||
|
|
||||||
protected $protectedFormerChosenObjects;
|
|
||||||
|
|
||||||
protected $defaultProperties = [
|
protected $defaultProperties = [
|
||||||
'uuid' => null,
|
'uuid' => null,
|
||||||
'basket_name' => null,
|
'basket_name' => null,
|
||||||
@ -122,7 +120,6 @@ class Basket extends DbObject implements ExportInterface
|
|||||||
if (empty($objects)) {
|
if (empty($objects)) {
|
||||||
$this->chosenObjects = [];
|
$this->chosenObjects = [];
|
||||||
} else {
|
} else {
|
||||||
$this->protectedFormerChosenObjects = $this->chosenObjects;
|
|
||||||
$this->chosenObjects = [];
|
$this->chosenObjects = [];
|
||||||
foreach ((array) $objects as $type => $object) {
|
foreach ((array) $objects as $type => $object) {
|
||||||
$this->addObjects($type, $object);
|
$this->addObjects($type, $object);
|
||||||
@ -150,14 +147,6 @@ class Basket extends DbObject implements ExportInterface
|
|||||||
if (! isset($this->chosenObjects[$type]) || ! is_array($this->chosenObjects[$type])) {
|
if (! isset($this->chosenObjects[$type]) || ! is_array($this->chosenObjects[$type])) {
|
||||||
$this->chosenObjects[$type] = [];
|
$this->chosenObjects[$type] = [];
|
||||||
}
|
}
|
||||||
if (isset($this->protectedFormerChosenObjects[$type])) {
|
|
||||||
if (is_array($this->protectedFormerChosenObjects[$type])) {
|
|
||||||
$this->chosenObjects[$type] = $this->protectedFormerChosenObjects[$type];
|
|
||||||
} else {
|
|
||||||
$this->chosenObjects[$type] = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($objects === self::SELECTION_CUSTOM) {
|
if ($objects === self::SELECTION_CUSTOM) {
|
||||||
$objects = [];
|
$objects = [];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user