From e30287cf814bca99b01561df0e60fb00c59ade42 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 10 May 2017 14:07:58 +0200 Subject: [PATCH] Fix comparisons in the files app Signed-off-by: Joas Schilling --- apps/files/ajax/download.php | 2 +- apps/files/lib/Helper.php | 2 +- apps/files/lib/Settings/Admin.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php index 17a7fd8b32..7c33cdec6d 100644 --- a/apps/files/ajax/download.php +++ b/apps/files/ajax/download.php @@ -51,7 +51,7 @@ if(isset($_GET['downloadStartSecret']) setcookie('ocDownloadStarted', $_GET['downloadStartSecret'], time() + 20, '/'); } -$server_params = array( 'head' => \OC::$server->getRequest()->getMethod() == 'HEAD' ); +$server_params = array( 'head' => \OC::$server->getRequest()->getMethod() === 'HEAD' ); /** * Http range requests support diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index d2cebce5dd..4a5595999d 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -227,7 +227,7 @@ class Helper { foreach ($filesById as $key => $fileWithTags) { foreach($fileList as $key2 => $file){ - if( $file[$fileIdentifier] == $key){ + if( $file[$fileIdentifier] === $key){ $fileList[$key2] = $fileWithTags; } } diff --git a/apps/files/lib/Settings/Admin.php b/apps/files/lib/Settings/Admin.php index da1d5deaf3..faaeb5b89c 100644 --- a/apps/files/lib/Settings/Admin.php +++ b/apps/files/lib/Settings/Admin.php @@ -46,7 +46,7 @@ class Admin implements ISettings { * @return TemplateResponse */ public function getForm() { - $htaccessWorking = (getenv('htaccessWorking') == 'true'); + $htaccessWorking = (getenv('htaccessWorking') === 'true'); $htaccessWritable = is_writable(\OC::$SERVERROOT.'/.htaccess'); $userIniWritable = is_writable(\OC::$SERVERROOT.'/.user.ini');