diff options
Diffstat (limited to 'application/front/controller/admin/ConfigureController.php')
-rw-r--r-- | application/front/controller/admin/ConfigureController.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/application/front/controller/admin/ConfigureController.php b/application/front/controller/admin/ConfigureController.php index 865fc2b0..e675fcca 100644 --- a/application/front/controller/admin/ConfigureController.php +++ b/application/front/controller/admin/ConfigureController.php | |||
@@ -98,10 +98,10 @@ class ConfigureController extends ShaarliAdminController | |||
98 | if ($thumbnailsMode !== Thumbnailer::MODE_NONE | 98 | if ($thumbnailsMode !== Thumbnailer::MODE_NONE |
99 | && $thumbnailsMode !== $this->container->conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) | 99 | && $thumbnailsMode !== $this->container->conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) |
100 | ) { | 100 | ) { |
101 | $this->saveWarningMessage(t( | 101 | $this->saveWarningMessage( |
102 | 'You have enabled or changed thumbnails mode. ' | 102 | t('You have enabled or changed thumbnails mode.') . |
103 | .'<a href="'. $this->container->basePath .'/admin/thumbnails">Please synchronize them</a>.' | 103 | '<a href="'. $this->container->basePath .'/admin/thumbnails">' . t('Please synchronize them.') .'</a>' |
104 | )); | 104 | ); |
105 | } | 105 | } |
106 | $this->container->conf->set('thumbnails.mode', $thumbnailsMode); | 106 | $this->container->conf->set('thumbnails.mode', $thumbnailsMode); |
107 | 107 | ||
@@ -110,8 +110,13 @@ class ConfigureController extends ShaarliAdminController | |||
110 | $this->container->history->updateSettings(); | 110 | $this->container->history->updateSettings(); |
111 | $this->container->pageCacheManager->invalidateCaches(); | 111 | $this->container->pageCacheManager->invalidateCaches(); |
112 | } catch (Throwable $e) { | 112 | } catch (Throwable $e) { |
113 | // TODO: translation + stacktrace | 113 | $this->assignView('message', t('Error while writing config file after configuration update.')); |
114 | $this->saveErrorMessage('ERROR while writing config file after configuration update.'); | 114 | |
115 | if ($this->container->conf->get('dev.debug', false)) { | ||
116 | $this->assignView('stacktrace', $e->getMessage() . PHP_EOL . $e->getTraceAsString()); | ||
117 | } | ||
118 | |||
119 | return $response->write($this->render('error')); | ||
115 | } | 120 | } |
116 | 121 | ||
117 | $this->saveSuccessMessage(t('Configuration was saved.')); | 122 | $this->saveSuccessMessage(t('Configuration was saved.')); |