Merge branch 'FX-alan-search-404' into alan_develop

ouyang
alan 10 years ago
commit 5343759f2f

@ -1064,6 +1064,16 @@ class User < Principal
anonymous_user
end
# refactor User model find function,
# return anonymous user when can not find user id = user_id
def self.find (*args, &block)
begin
super
rescue
self.anonymous
end
# super
end
# Salts all existing unsalted passwords
# It changes password storage scheme from SHA1(password) to SHA1(salt + SHA1(password))
# This method is used in the SaltPasswords migration and is to be kept as is

@ -1,7 +1,7 @@
<% unless all_results.nil? || all_results.empty?%>
<% all_results.each do |item|%>
<% all_results.each do |item|%>
<% case item.type %>
<% when 'user'%>
<% when 'user'%>
<ul class="searchContent">
<li class="fl"></li>
<li class="fl searchContentDes">
@ -98,7 +98,7 @@
<div class="cl"></div>
</ul>
<%end %>
<% end %>
<% end %>
<div class="pageRoll">
<%= paginate all_results,:params => {:controller => 'welcome', :action => 'search',:search_type=>'all'}%>
</div>

Loading…
Cancel
Save