|
@@ -95,7 +95,7 @@ discard block |
|
|
block discarded – undo |
|
95
|
95
|
$this->eventDispatcher->dispatchTyped(new RegisterWidgetEvent($this->dashboardManager)); |
|
96
|
96
|
|
|
97
|
97
|
$userLayout = explode(',', $this->config->getUserValue($this->userId, 'dashboard', 'layout', 'recommendations,spreed,mail,calendar')); |
|
98
|
|
- $widgets = array_map(function (IWidget $widget) { |
|
|
98
|
+ $widgets = array_map(function(IWidget $widget) { |
|
99
|
99
|
return [ |
|
100
|
100
|
'id' => $widget->getId(), |
|
101
|
101
|
'title' => $widget->getTitle(), |
|
@@ -128,7 +128,7 @@ discard block |
|
|
block discarded – undo |
|
128
|
128
|
* @NoAdminRequired |
|
129
|
129
|
*/ |
|
130
|
130
|
public function setBackground(string $type, string $value): JSONResponse { |
|
131
|
|
- $currentVersion = (int)$this->config->getUserValue($this->userId, 'dashboard', 'backgroundVersion', 0); |
|
|
131
|
+ $currentVersion = (int) $this->config->getUserValue($this->userId, 'dashboard', 'backgroundVersion', 0); |
|
132
|
132
|
try { |
|
133
|
133
|
switch ($type) { |
|
134
|
134
|
case 'shipped': |
|
@@ -152,7 +152,7 @@ discard block |
|
|
block discarded – undo |
|
152
|
152
|
return new JSONResponse(['error' => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
153
|
153
|
} |
|
154
|
154
|
$currentVersion++; |
|
155
|
|
- $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', (string)$currentVersion); |
|
|
155
|
+ $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', (string) $currentVersion); |
|
156
|
156
|
return new JSONResponse([ |
|
157
|
157
|
'type' => $type, |
|
158
|
158
|
'value' => $value, |