summaryrefslogtreecommitdiffstats
path: root/core/Controller/JsController.php
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-02 13:13:19 +0330
committerFaraz Samapoor <f.samapoor@gmail.com>2023-06-02 13:13:19 +0330
commita1ef0285f89112b8777eb47f3c34d07f111660b4 (patch)
treebd8791fd09d6c18e3859d44382de9ef0f8ead10e /core/Controller/JsController.php
parent09c5f997c6d185d8b23b37a996e7a1130a426d75 (diff)
downloadnextcloud-server-a1ef0285f89112b8777eb47f3c34d07f111660b4.tar.gz
nextcloud-server-a1ef0285f89112b8777eb47f3c34d07f111660b4.zip
Refactors "strpos" calls in /core to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
Diffstat (limited to 'core/Controller/JsController.php')
-rw-r--r--core/Controller/JsController.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Controller/JsController.php b/core/Controller/JsController.php
index 885de5491e7..6b3e7ff2ed2 100644
--- a/core/Controller/JsController.php
+++ b/core/Controller/JsController.php
@@ -99,7 +99,7 @@ class JsController extends Controller {
private function getFile(ISimpleFolder $folder, string $fileName, bool &$gzip): ISimpleFile {
$encoding = $this->request->getHeader('Accept-Encoding');
- if (strpos($encoding, 'gzip') !== false) {
+ if (str_contains($encoding, 'gzip')) {
try {
$gzip = true;
return $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz