|
@@ -101,7 +101,7 @@ discard block |
|
|
block discarded – undo |
|
101
|
101
|
|
|
102
|
102
|
$systemDefault = $this->config->getAppValue('dashboard', 'layout', 'recommendations,spreed,mail,calendar'); |
|
103
|
103
|
$userLayout = explode(',', $this->config->getUserValue($this->userId, 'dashboard', 'layout', $systemDefault)); |
|
104
|
|
- $widgets = array_map(function (IWidget $widget) { |
|
|
104
|
+ $widgets = array_map(function(IWidget $widget) { |
|
105
|
105
|
return [ |
|
106
|
106
|
'id' => $widget->getId(), |
|
107
|
107
|
'title' => $widget->getTitle(), |
|
@@ -163,7 +163,7 @@ discard block |
|
|
block discarded – undo |
|
163
|
163
|
* @NoAdminRequired |
|
164
|
164
|
*/ |
|
165
|
165
|
public function setBackground(string $type = 'default', string $value = ''): JSONResponse { |
|
166
|
|
- $currentVersion = (int)$this->config->getUserValue($this->userId, 'dashboard', 'backgroundVersion', '0'); |
|
|
166
|
+ $currentVersion = (int) $this->config->getUserValue($this->userId, 'dashboard', 'backgroundVersion', '0'); |
|
167
|
167
|
try { |
|
168
|
168
|
switch ($type) { |
|
169
|
169
|
case 'shipped': |
|
@@ -187,7 +187,7 @@ discard block |
|
|
block discarded – undo |
|
187
|
187
|
return new JSONResponse(['error' => $e->getMessage()], Http::STATUS_INTERNAL_SERVER_ERROR); |
|
188
|
188
|
} |
|
189
|
189
|
$currentVersion++; |
|
190
|
|
- $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', (string)$currentVersion); |
|
|
190
|
+ $this->config->setUserValue($this->userId, 'dashboard', 'backgroundVersion', (string) $currentVersion); |
|
191
|
191
|
return new JSONResponse([ |
|
192
|
192
|
'type' => $type, |
|
193
|
193
|
'value' => $value, |