diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-11-10 10:46:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 10:46:04 +0100 |
commit | 302662797cb5e8ac6579a99297ceae301f7927a6 (patch) | |
tree | 67f493a1cc6d3691742946f1d7e512bffe41e02f /application/front/controller/admin/ShaarePublishController.php | |
parent | c94c32d1a3e86a479cb2582eadc668a5bb476fc6 (diff) | |
parent | 2f4df753041088d788d1923692a7d530167a6840 (diff) | |
download | Shaarli-302662797cb5e8ac6579a99297ceae301f7927a6.tar.gz Shaarli-302662797cb5e8ac6579a99297ceae301f7927a6.tar.zst Shaarli-302662797cb5e8ac6579a99297ceae301f7927a6.zip |
Merge pull request #1635 from ArthurHoaro/feature/phpcs
Diffstat (limited to 'application/front/controller/admin/ShaarePublishController.php')
-rw-r--r-- | application/front/controller/admin/ShaarePublishController.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/application/front/controller/admin/ShaarePublishController.php b/application/front/controller/admin/ShaarePublishController.php index 625a5680..4cbfcdc5 100644 --- a/application/front/controller/admin/ShaarePublishController.php +++ b/application/front/controller/admin/ShaarePublishController.php | |||
@@ -118,7 +118,8 @@ class ShaarePublishController extends ShaarliAdminController | |||
118 | $this->container->conf->get('general.tags_separator', ' ') | 118 | $this->container->conf->get('general.tags_separator', ' ') |
119 | ); | 119 | ); |
120 | 120 | ||
121 | if ($this->container->conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) !== Thumbnailer::MODE_NONE | 121 | if ( |
122 | $this->container->conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) !== Thumbnailer::MODE_NONE | ||
122 | && true !== $this->container->conf->get('general.enable_async_metadata', true) | 123 | && true !== $this->container->conf->get('general.enable_async_metadata', true) |
123 | && $bookmark->shouldUpdateThumbnail() | 124 | && $bookmark->shouldUpdateThumbnail() |
124 | ) { | 125 | ) { |
@@ -148,7 +149,8 @@ class ShaarePublishController extends ShaarliAdminController | |||
148 | return $this->redirectFromReferer( | 149 | return $this->redirectFromReferer( |
149 | $request, | 150 | $request, |
150 | $response, | 151 | $response, |
151 | ['/admin/add-shaare', '/admin/shaare'], ['addlink', 'post', 'edit_link'], | 152 | ['/admin/add-shaare', '/admin/shaare'], |
153 | ['addlink', 'post', 'edit_link'], | ||
152 | $bookmark->getShortUrl() | 154 | $bookmark->getShortUrl() |
153 | ); | 155 | ); |
154 | } | 156 | } |
@@ -168,10 +170,10 @@ class ShaarePublishController extends ShaarliAdminController | |||
168 | $this->assignView($key, $value); | 170 | $this->assignView($key, $value); |
169 | } | 171 | } |
170 | 172 | ||
171 | $editLabel = false === $isNew ? t('Edit') .' ' : ''; | 173 | $editLabel = false === $isNew ? t('Edit') . ' ' : ''; |
172 | $this->assignView( | 174 | $this->assignView( |
173 | 'pagetitle', | 175 | 'pagetitle', |
174 | $editLabel . t('Shaare') .' - '. $this->container->conf->get('general.title', 'Shaarli') | 176 | $editLabel . t('Shaare') . ' - ' . $this->container->conf->get('general.title', 'Shaarli') |
175 | ); | 177 | ); |
176 | 178 | ||
177 | return $response->write($this->render(TemplatePage::EDIT_LINK)); | 179 | return $response->write($this->render(TemplatePage::EDIT_LINK)); |
@@ -194,7 +196,8 @@ class ShaarePublishController extends ShaarliAdminController | |||
194 | 196 | ||
195 | // If this is an HTTP(S) link, we try go get the page to extract | 197 | // If this is an HTTP(S) link, we try go get the page to extract |
196 | // the title (otherwise we will to straight to the edit form.) | 198 | // the title (otherwise we will to straight to the edit form.) |
197 | if (true !== $this->container->conf->get('general.enable_async_metadata', true) | 199 | if ( |
200 | true !== $this->container->conf->get('general.enable_async_metadata', true) | ||
198 | && empty($title) | 201 | && empty($title) |
199 | && strpos(get_url_scheme($url) ?: '', 'http') !== false | 202 | && strpos(get_url_scheme($url) ?: '', 'http') !== false |
200 | ) { | 203 | ) { |