From 9ab12e099d10925c1e97d441cb7a3f8f9af31bd2 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 12 Jul 2015 14:01:06 +0200 Subject: [PATCH] Fix search blobs for wiki Signed-off-by: Dmitriy Zaporozhets --- app/models/repository.rb | 2 +- app/views/search/results/_blob.html.haml | 2 +- app/views/search/results/_wiki_blob.html.haml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index a7b990b1ba5..8a9213f659c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -437,7 +437,7 @@ class Repository Gitlab::Popen.popen(args, path_to_repo).first.scrub.split(/^--$/) end - def search_to_blob(result) + def parse_search_result(result) ref = nil filename = nil startline = 0 diff --git a/app/views/search/results/_blob.html.haml b/app/views/search/results/_blob.html.haml index 9be13207070..58f58eff54d 100644 --- a/app/views/search/results/_blob.html.haml +++ b/app/views/search/results/_blob.html.haml @@ -1,4 +1,4 @@ -- blob = @project.repository.search_to_blob(blob) +- blob = @project.repository.parse_search_result(blob) .blob-result .file-holder .file-title diff --git a/app/views/search/results/_wiki_blob.html.haml b/app/views/search/results/_wiki_blob.html.haml index f9c5810e3d0..c03438eb952 100644 --- a/app/views/search/results/_wiki_blob.html.haml +++ b/app/views/search/results/_wiki_blob.html.haml @@ -1,3 +1,4 @@ +- wiki_blob = @project.repository.parse_search_result(wiki_blob) .blob-result .file-holder .file-title -- GitLab