Skip to content

Commit

Permalink
[webui] no error messages when searching for a disturl successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Aug 8, 2013
1 parent 0b9e630 commit ef67506
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/webui/app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ def search

if @search_text.starts_with?("obs://")
# The user entered an OBS-specific RPM disturl, redirect to package source files with respective revision
unless handle_disturl(@search_text)
flash[:error] = "This disturl does not compute!"
return
end
flash[:error] = "This disturl does not compute!" unless handle_disturl(@search_text)
return
end

logger.debug "Searching for the string \"#{@search_text}\" in the #{@search_where}'s of #{@search_what}'s"
Expand Down Expand Up @@ -127,7 +125,7 @@ def handle_disturl(disturl)
disturl_rev, disturl_package = disturl_pkgrev.split('-', 2)
end
unless disturl_package.nil? || disturl_rev.nil?
redirect_to :controller => 'package', :action => 'show', :project => disturl_project, :package => disturl_package, :rev => disturl_rev and return
redirect_to :controller => 'package', :action => 'show', :project => disturl_project, :package => disturl_package, :rev => disturl_rev and return true
end
logger.debug "Computing disturl #{disturl} failed"
return false
Expand Down

0 comments on commit ef67506

Please sign in to comment.