From e8bc4a04cfe0333c4275f03073e7876190787304 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 15 Sep 2011 22:45:44 +0200 Subject: remove unneeded call to filename2extension mime2extension tells us if the file is text that can be highlit. filename2extension leeds to unwanted behaviour if the filename is for example "PKGBUILD", but the file is a binary. Signed-off-by: Florian Pritz --- application/models/file_mod.php | 1 - 1 file changed, 1 deletion(-) diff --git a/application/models/file_mod.php b/application/models/file_mod.php index c45dd85d5..fce84c090 100644 --- a/application/models/file_mod.php +++ b/application/models/file_mod.php @@ -117,7 +117,6 @@ class File_mod extends CI_Model { $file = $this->file($filedata['hash']); $type = $filedata['mimetype']; $mode = $this->mime2extension($type); - $mode = $this->filename2extension($filedata['filename']) ? $this->filename2extension($filedata['filename']) : $mode; // If we detected a highlightable file redirect, // otherwise show the URL because browsers would just show a DL dialog -- cgit v1.2.3-24-g4f1b