summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-08-11 16:13:05 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-08-15 11:30:22 +0200
commitd6d08a78344675340fe5cffbeaab16550b37eceb (patch)
treef8d384b01ef28ada9dc67b06bfdf0b01c68e7b23 /application
parente502e0ce05d183bbf8237b94631d6e602d54b719 (diff)
rewrite scripts/mimetype to support ascii with color codes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/models/file_mod.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/application/models/file_mod.php b/application/models/file_mod.php
index 15bab0c4d..dcf33f9d4 100644
--- a/application/models/file_mod.php
+++ b/application/models/file_mod.php
@@ -96,7 +96,7 @@ class File_mod extends CI_Model {
// TODO: Should only update not insert; see new_id()
function add_file($hash, $id, $filename)
{
- $mimetype = exec(FCPATH.'scripts/mimetype -b --orig-name '.escapeshellarg($filename).' '.escapeshellarg($this->file($hash)));
+ $mimetype = exec(FCPATH.'scripts/mimetype '.escapeshellarg($filename).' '.escapeshellarg($this->file($hash)));
$query = $this->db->query('
INSERT INTO `files` (`hash`, `id`, `filename`, `password`, `date`, `mimetype`)
VALUES (?, ?, ?, ?, ?, ?)',
@@ -379,6 +379,7 @@ class File_mod extends CI_Model {
{
$typearray = array(
'text/plain' => 'text',
+ 'text/plain-ascii' => 'ascii',
'text/x-python' => 'python',
'text/x-csrc' => 'c',
'text/x-chdr' => 'c',