From 56ae0abe5e6aab4644be388cef4682836d86956f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=AF=D0=BA=D0=BE=D0=B2=D0=BB=D0=B5=D0=B2?= <vlad309523@gmail.com> Date: Mon, 31 Oct 2016 17:44:04 +0300 Subject: [PATCH] #52 Fix upload students --- ~dev_rating/application/classes/FileParser.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/~dev_rating/application/classes/FileParser.php b/~dev_rating/application/classes/FileParser.php index e881ca733..7c20fa49c 100644 --- a/~dev_rating/application/classes/FileParser.php +++ b/~dev_rating/application/classes/FileParser.php @@ -9,15 +9,10 @@ class FileParser * @return array errors */ public static function uploadStudents($filename, $facultyID) { - if (File::mime($filename) != 'text/plain') - return []; - - $file = file_get_contents($filename); - $content = explode("\r\n", self::toUTF8($file)); // DO NOT REPLACE " BY ' THERE! + $content = explode("\r\n", self::toUTF8(file_get_contents($filename))); $i = 0; $errors = []; - foreach ($content as $line) { $line = explode(';', $line); $line = Arr::map('trim', $line); -- GitLab