diff options
author | ArthurHoaro <arthur.hoareau@wizacha.com> | 2020-07-23 16:41:32 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 3ee8351e438f13ccf36062ce956e0b4a4d5f4a29 (patch) | |
tree | 5c5ea281a072e4dffe0b97c12269278c999710df /application/front/controller/admin | |
parent | fabff3835da26e6c95cea56b2a01a03749dec7c8 (diff) | |
download | Shaarli-3ee8351e438f13ccf36062ce956e0b4a4d5f4a29.tar.gz Shaarli-3ee8351e438f13ccf36062ce956e0b4a4d5f4a29.tar.zst Shaarli-3ee8351e438f13ccf36062ce956e0b4a4d5f4a29.zip |
Multiple small fixes
Diffstat (limited to 'application/front/controller/admin')
-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.')); |