diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-27 15:06:40 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-27 15:06:40 +0100 |
commit | 740feeec772565b0734cae816b31dcb47e5f4492 (patch) | |
tree | 600cac255cb3ceeb843ec03c6e84c44168964264 /lib/gitlab | |
parent | 7851a292a1fc7da3cd2d1140cd40f35009a9c082 (diff) | |
parent | 940d68cc4c349b574166b010666a36cf25f485b7 (diff) | |
download | gitlab-ce-740feeec772565b0734cae816b31dcb47e5f4492.tar.gz |
Merge branch 'master' into reference-pipeline-and-caching
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/backend/grack_auth.rb | 9 | ||||
-rw-r--r-- | lib/gitlab/database.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/project_search_results.rb | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/gitlab/backend/grack_auth.rb b/lib/gitlab/backend/grack_auth.rb index 6830a916bcb..85a2d1a93a7 100644 --- a/lib/gitlab/backend/grack_auth.rb +++ b/lib/gitlab/backend/grack_auth.rb @@ -193,12 +193,19 @@ module Grack end def render_grack_auth_ok + repo_path = + if @request.path_info =~ /^([\w\.\/-]+)\.wiki\.git/ + ProjectWiki.new(project).repository.path_to_repo + else + project.repository.path_to_repo + end + [ 200, { "Content-Type" => "application/json" }, [JSON.dump({ 'GL_ID' => Gitlab::ShellEnv.gl_id(@user), - 'RepoPath' => project.repository.path_to_repo, + 'RepoPath' => repo_path, })] ] end diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb index 741a52714ac..71f37f1fef8 100644 --- a/lib/gitlab/database.rb +++ b/lib/gitlab/database.rb @@ -1,7 +1,7 @@ module Gitlab module Database def self.mysql? - ActiveRecord::Base.connection.adapter_name.downcase == 'mysql' + ActiveRecord::Base.connection.adapter_name.downcase == 'mysql2' end def self.postgresql? diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb index 0dab7bcfa4d..0a2be605af9 100644 --- a/lib/gitlab/project_search_results.rb +++ b/lib/gitlab/project_search_results.rb @@ -9,7 +9,7 @@ module Gitlab else nil end - @query = Shellwords.shellescape(query) if query.present? + @query = query end def objects(scope, page = nil) |