@@ 224-236 (lines=13) @@ | ||
221 | * |
|
222 | * @return DataResponse |
|
223 | */ |
|
224 | public function removeCustomTemplate($template) { |
|
225 | ||
226 | $custom = $this->templatesService->getTemplatesList(true); |
|
227 | ||
228 | $k = array_search($template, $custom); |
|
229 | if ($k !== false) { |
|
230 | unset($custom[$k]); |
|
231 | } |
|
232 | ||
233 | $this->configService->setAppValue(ConfigService::CUSTOM_TEMPLATES, json_encode($custom)); |
|
234 | ||
235 | return $this->getSettingsAdmin(); |
|
236 | } |
|
237 | ||
238 | ||
239 | /** |
|
@@ 258-269 (lines=12) @@ | ||
255 | * |
|
256 | * @return DataResponse |
|
257 | */ |
|
258 | public function removeCustomTheme($theme) { |
|
259 | $custom = $this->themesService->getThemesList(true); |
|
260 | ||
261 | $k = array_search($theme, $custom); |
|
262 | if ($k !== false) { |
|
263 | unset($custom[$k]); |
|
264 | } |
|
265 | ||
266 | $this->configService->setAppValue(ConfigService::CUSTOM_THEMES, json_encode($custom)); |
|
267 | ||
268 | return $this->getSettingsAdmin(); |
|
269 | } |
|
270 | ||
271 | } |