summaryrefslogtreecommitdiffstats
path: root/system/application/models
diff options
context:
space:
mode:
Diffstat (limited to 'system/application/models')
-rw-r--r--system/application/models/file_mod.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/system/application/models/file_mod.php b/system/application/models/file_mod.php
index 9e9a8b4da..fd49c30c0 100644
--- a/system/application/models/file_mod.php
+++ b/system/application/models/file_mod.php
@@ -160,6 +160,7 @@ class File_mod extends Model {
if (!$mode && substr_count(ltrim($this->uri->uri_string(), "/"), '/') >= 1) {
$mode = $this->mime2extension($type);
+ $mode = $this->filename2extension($filedata['filename']) ? $this->filename2extension($filedata['filename']) : $mode;
}
if (!$modified) {
@@ -349,6 +350,16 @@ class File_mod extends Model {
return false;
}
+ function filename2extension($name)
+ {
+ $namearray = array(
+ 'PKGBUILD' => 'sh'
+ );
+ if (array_key_exists($name, $namearray)) return $namearray[$name];
+
+ return false;
+ }
+
}
# vim: set ts=2 sw=2 et: