From 83448fb98a3b6e737aba5aacf800c203d1f8daed Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Fri, 27 Oct 2023 12:22:59 +0100 Subject: [PATCH] LIMS-1074: Use readgzfile to replace readfile, and gzdecode the contents of files to manipulate --- api/src/Downstream/BigEPPhasing.php | 1 - api/src/Downstream/Type/FastEp.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/api/src/Downstream/BigEPPhasing.php b/api/src/Downstream/BigEPPhasing.php index 931d9a45e..63458784f 100644 --- a/api/src/Downstream/BigEPPhasing.php +++ b/api/src/Downstream/BigEPPhasing.php @@ -28,7 +28,6 @@ function results() { $dat['IMAGE'] = file_exists($image) || file_exists($image.'.gz'); $model = $this->_get_attachments('big_ep_model_ispyb.json'); - $dat['HASMODEL'] = $model && (file_exists($model['FILE']) || file_exists($model['FILE'].'.gz')); if ($model) { if (file_exists($model['FILE'])) { diff --git a/api/src/Downstream/Type/FastEp.php b/api/src/Downstream/Type/FastEp.php index 761f32500..286b07b1e 100644 --- a/api/src/Downstream/Type/FastEp.php +++ b/api/src/Downstream/Type/FastEp.php @@ -45,7 +45,7 @@ function results() { if (file_exists($lst['FILE'])) { $lst = file_get_contents($lst['FILE']); } elseif (file_exists($lst['FILE'].'.gz')) { - $lst = readgzfile($lst['FILE'].'.gz'); + $lst = gzdecode(file_get_contents($lst['FILE'].'.gz')); } else { $this->_error('Could not find sad.lst file'); }