diff --git a/classes/file_search.php b/classes/file_search.php index aaa2e91..fd51260 100644 --- a/classes/file_search.php +++ b/classes/file_search.php @@ -438,6 +438,9 @@ public static function search_file(object $filerecord, object $criteria, $stream self::CSV_FILEPATH => $filerecord->filepath, self::CSV_FILENAME => $filerecord->filename, self::CSV_MIMETYPE => $filerecord->mimetype, + self::CSV_STRATEGY => 'plain', + self::CSV_INTERNAL => '', + self::CSV_REPLACE => '', ]; switch ($filerecord->mimetype) { case 'application/zip.h5p': @@ -450,8 +453,6 @@ public static function search_file(object $filerecord, object $criteria, $stream } break; default: - $csv[self::CSV_STRATEGY] = 'plain'; - $csv[self::CSV_INTERNAL] = ''; $matchcount = self::grep_content($csv, $file->get_content(), $criteria, $stream); break; }