From 32cd82fc017195480a0d73acc19c7c64962153da Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 15 Sep 2013 23:17:46 +0200 Subject: Add default get_email to Duser_Driver This fixes a possible endless loop when the function is not implemented in the driver, but the array says it is. It also allows us to simply call it without checking if it's implemented. Signed-off-by: Florian Pritz --- application/models/muser.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'application/models') diff --git a/application/models/muser.php b/application/models/muser.php index 2dd7280e8..7a3627b18 100644 --- a/application/models/muser.php +++ b/application/models/muser.php @@ -142,10 +142,6 @@ class Muser extends CI_Model { function get_email($userid) { - if (!$this->duser->is_implemented("get_email")) { - return false; - } - return $this->duser->get_email($userid); } -- cgit v1.2.3-24-g4f1b From d1d83c9e97fc4542a0b8c19ddf27fef3a0beb46e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 16 Sep 2013 21:22:52 +0200 Subject: Remove executable bits Signed-off-by: Florian Pritz --- application/models/index.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 application/models/index.html (limited to 'application/models') diff --git a/application/models/index.html b/application/models/index.html old mode 100755 new mode 100644 -- cgit v1.2.3-24-g4f1b From 551c359d8e50608093ba0f7179bd311d89e90da2 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 22 Sep 2013 20:31:35 +0200 Subject: Add some more file extension -> lexer mappings Mimetype detection doesn't always properly detect code (I saw javascript as plain text, c as asm) and if there is an extension we can likely get better result by using that. Signed-off-by: Florian Pritz --- application/models/mfile.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'application/models') diff --git a/application/models/mfile.php b/application/models/mfile.php index e862f1930..e70b5c812 100644 --- a/application/models/mfile.php +++ b/application/models/mfile.php @@ -476,11 +476,29 @@ class Mfile extends CI_Model { $extension = substr($name, strrpos($name, ".") + 1); $extensionarray = array( + 'awk' => 'awk', + 'c' => 'c', 'coffee' => 'coffee-script', + 'cpp' => 'cpp', + 'diff' => 'diff', + 'h' => 'c', + 'hs' => 'haskell', + 'html' => 'xml', + 'java' => 'java', + 'js' => 'js', + 'lua' => 'lua', 'mli' => 'ocaml', 'mll' => 'ocaml', 'ml' => 'ocaml', 'mly' => 'ocaml', + 'patch' => 'diff', + 'php' => 'php', + 'pl' => 'perl', + 'py' => 'python', + 'rb' => 'ruby', + 's' => 'asm', + 'sh' => 'bash', + 'svg' => 'xml', 'tcl' => 'tcl', 'tex' => 'tex', ); -- cgit v1.2.3-24-g4f1b