summaryrefslogtreecommitdiffstats
path: root/system/application
diff options
context:
space:
mode:
Diffstat (limited to 'system/application')
-rw-r--r--system/application/models/file_mod.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/application/models/file_mod.php b/system/application/models/file_mod.php
index 20ebe58f4..24b491831 100644
--- a/system/application/models/file_mod.php
+++ b/system/application/models/file_mod.php
@@ -182,6 +182,7 @@ class File_mod extends Model {
$mode = $this->mime2extension($type);
$mode = $this->filename2extension($filedata['filename']) ? $this->filename2extension($filedata['filename']) : $mode;
}
+ $mode = $this->extension_aliases($mode);
// TODO: cleanup conditions
if ($mode && $mode != 'plain' && $mode != 'qr'
@@ -375,6 +376,17 @@ class File_mod extends Model {
return false;
}
+ // Handle alias extensions
+ function extension_aliases($alias)
+ {
+ $aliasarray = array(
+ 'py' => 'python'
+ );
+ if (array_key_exists($alias, $aliasarray)) return $aliasarray[$alias];
+
+ return $alias;
+ }
+
}
# vim: set noet: