aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/Utils.php1
-rw-r--r--application/front/controller/admin/ShaareManageController.php4
-rw-r--r--application/helper/ApplicationUtils.php2
3 files changed, 6 insertions, 1 deletions
diff --git a/application/Utils.php b/application/Utils.php
index 952378ab..c5cd884b 100644
--- a/application/Utils.php
+++ b/application/Utils.php
@@ -323,6 +323,7 @@ function format_date($date, $time = true, $intl = true)
323 IntlDateFormatter::LONG, 323 IntlDateFormatter::LONG,
324 $time ? IntlDateFormatter::LONG : IntlDateFormatter::NONE 324 $time ? IntlDateFormatter::LONG : IntlDateFormatter::NONE
325 ); 325 );
326 $formatter->setTimeZone($date->getTimezone());
326 327
327 return $formatter->format($date); 328 return $formatter->format($date);
328} 329}
diff --git a/application/front/controller/admin/ShaareManageController.php b/application/front/controller/admin/ShaareManageController.php
index 35837baa..9633cd51 100644
--- a/application/front/controller/admin/ShaareManageController.php
+++ b/application/front/controller/admin/ShaareManageController.php
@@ -66,6 +66,10 @@ class ShaareManageController extends ShaarliAdminController
66 return $response->write('<script>self.close();</script>'); 66 return $response->write('<script>self.close();</script>');
67 } 67 }
68 68
69 if ($request->getParam('source') === 'batch') {
70 return $response->withStatus(204);
71 }
72
69 // Don't redirect to permalink after deletion. 73 // Don't redirect to permalink after deletion.
70 return $this->redirectFromReferer($request, $response, ['shaare/']); 74 return $this->redirectFromReferer($request, $response, ['shaare/']);
71 } 75 }
diff --git a/application/helper/ApplicationUtils.php b/application/helper/ApplicationUtils.php
index a6c03aae..f79998b5 100644
--- a/application/helper/ApplicationUtils.php
+++ b/application/helper/ApplicationUtils.php
@@ -37,7 +37,7 @@ class ApplicationUtils
37 { 37 {
38 list($headers, $data) = get_http_response($url, $timeout); 38 list($headers, $data) = get_http_response($url, $timeout);
39 39
40 if (strpos($headers[0], '200 OK') === false) { 40 if (preg_match('#HTTP/[\d\.]+ 200(?: OK)?#', $headers[0]) !== 1) {
41 error_log('Failed to retrieve ' . $url); 41 error_log('Failed to retrieve ' . $url);
42 return false; 42 return false;
43 } 43 }