This commit is contained in:
albert
2013-03-30 15:18:52 -04:00
parent bd28711158
commit a1675c65a8
5 changed files with 6 additions and 9 deletions

View File

@@ -1,3 +1,3 @@
<%= form_tag(artists_path, :method => :get) do %>
<%= text_field "search", "name" %>
<%= text_field "search", "name", :id => "quicksearch_name" %>
<% end %>

View File

@@ -1,3 +1,3 @@
<%= form_tag(pools_path, :method => :get) do %>
<%= text_field "search", "name_matches" %>
<%= text_field "search", "name_matches", :id => "quick_search_name_matches" %>
<% end %>

View File

@@ -1,3 +1,3 @@
<%= form_tag(tags_path, :method => :get) do %>
<%= text_field "search", "name_matches" %>
<%= text_field "search", "name_matches", :id => "quick_search_name_matches" %>
<% end %>

View File

@@ -1,3 +1,3 @@
<%= form_tag(wiki_pages_path, :method => :get) do %>
<%= text_field "search", "title" %>
<%= text_field "search", "title", :id => "quick_search_title" %>
<% end %>

View File

@@ -1,11 +1,8 @@
class ChangeSourcePatternIndexOnPosts < ActiveRecord::Migration
def up
execute "set statement_timeout = 0"
begin
execute "DROP INDEX index_posts_on_pixiv_suffix"
execute "DROP INDEX index_posts_on_source_pattern"
rescue Exception
end
execute "DROP INDEX index_posts_on_pixiv_suffix"
execute "DROP INDEX index_posts_on_source_pattern"
execute "CREATE FUNCTION SourcePattern(src text) RETURNS text AS $$
BEGIN
RETURN regexp_replace(src, '^[^/]*(//)?[^/]*\.pixiv\.net/img.*(/[^/]*/[^/]*)$', E'pixiv\\\\2');