From 7a37a9bd76ceff05a8e7b0b0bc0ac847e16ade34 Mon Sep 17 00:00:00 2001 From: Toks Date: Sun, 5 Apr 2015 19:22:16 -0400 Subject: [PATCH] Remove /tag_aliases/new and /tag_implications/new This page is bugged. It creates an alias record without doing anything else like moving the posts. I think it's been like this for years yet nobody noticed so I assume it never gets used and the batch import page is just used instead. --- app/controllers/tag_aliases_controller.rb | 10 --------- .../tag_implications_controller.rb | 10 --------- .../tag_aliases/_secondary_links.html.erb | 6 +----- app/views/tag_aliases/new.html.erb | 21 ------------------- .../_secondary_links.html.erb | 6 +----- app/views/tag_implications/new.html.erb | 21 ------------------- 6 files changed, 2 insertions(+), 72 deletions(-) delete mode 100644 app/views/tag_aliases/new.html.erb delete mode 100644 app/views/tag_implications/new.html.erb diff --git a/app/controllers/tag_aliases_controller.rb b/app/controllers/tag_aliases_controller.rb index 263ccc2d6..bfbb0d690 100644 --- a/app/controllers/tag_aliases_controller.rb +++ b/app/controllers/tag_aliases_controller.rb @@ -7,11 +7,6 @@ class TagAliasesController < ApplicationController respond_with(@tag_alias) end - def new - @tag_alias = TagAlias.new(params[:tag_alias]) - respond_with(@tag_alias) - end - def edit @tag_alias = TagAlias.find(params[:id]) end @@ -36,11 +31,6 @@ class TagAliasesController < ApplicationController end end - def create - @tag_alias = TagAlias.create(params[:tag_alias]) - respond_with(@tag_alias, :location => tag_aliases_path(:search => {:id => @tag_alias.id})) - end - def destroy @tag_alias = TagAlias.find(params[:id]) if @tag_alias.deletable_by?(CurrentUser.user) diff --git a/app/controllers/tag_implications_controller.rb b/app/controllers/tag_implications_controller.rb index 84e4fe181..167d4aef2 100644 --- a/app/controllers/tag_implications_controller.rb +++ b/app/controllers/tag_implications_controller.rb @@ -7,11 +7,6 @@ class TagImplicationsController < ApplicationController respond_with(@tag_implication) end - def new - @tag_implication = TagImplication.new - respond_with(@tag_implication) - end - def edit @tag_implication = TagImplication.find(params[:id]) end @@ -36,11 +31,6 @@ class TagImplicationsController < ApplicationController end end - def create - @tag_implication = TagImplication.create(params[:tag_implication]) - respond_with(@tag_implication, :location => tag_implications_path(:search => {:id => @tag_implication.id})) - end - def destroy @tag_implication = TagImplication.find(params[:id]) if @tag_implication.deletable_by?(CurrentUser.user) diff --git a/app/views/tag_aliases/_secondary_links.html.erb b/app/views/tag_aliases/_secondary_links.html.erb index f72861d32..ba769bd27 100644 --- a/app/views/tag_aliases/_secondary_links.html.erb +++ b/app/views/tag_aliases/_secondary_links.html.erb @@ -2,11 +2,7 @@
  • <%= link_to "Listing", tag_aliases_path %>
  • <%= link_to "MetaSearch", meta_searches_tags_path %>
  • - <% if CurrentUser.is_admin? %> -
  • <%= link_to "New", new_tag_alias_path %>
  • - <% else %> -
  • <%= link_to "Request alias", new_tag_alias_request_path %>
  • - <% end %> +
  • <%= link_to "Request alias", new_tag_alias_request_path %>
  • <%= link_to "Request bulk update", new_bulk_update_request_path %>
  • <%= link_to "Help", wiki_pages_path(:title => "help:tag_aliases") %>
  • diff --git a/app/views/tag_aliases/new.html.erb b/app/views/tag_aliases/new.html.erb deleted file mode 100644 index 7c48afc0a..000000000 --- a/app/views/tag_aliases/new.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -
    -
    -

    New Tag Alias

    - - <%= error_messages_for :tag_alias %> - - <%= simple_form_for(@tag_alias) do |f| %> - <%= f.input :status, :value => "pending", :as => :hidden %> - <%= f.input :antecedent_name, :as => :string, :label => "From" %> - <%= f.input :consequent_name, :label => "To" %> - <%= f.input :forum_topic_id, :label => "Forum" %> - <%= f.button :submit %> - <% end %> -
    -
    - -<%= render "secondary_links" %> - -<% content_for(:page_title) do %> - New Tag Alias - <%= Danbooru.config.app_name %> -<% end %> diff --git a/app/views/tag_implications/_secondary_links.html.erb b/app/views/tag_implications/_secondary_links.html.erb index 3bc0b464b..1a1d65472 100644 --- a/app/views/tag_implications/_secondary_links.html.erb +++ b/app/views/tag_implications/_secondary_links.html.erb @@ -2,11 +2,7 @@
  • <%= link_to "Listing", tag_implications_path %>
  • <%= link_to "MetaSearch", meta_searches_tags_path %>
  • - <% if CurrentUser.is_admin? %> -
  • <%= link_to "New", new_tag_implication_path %>
  • - <% else %> -
  • <%= link_to "Request implication", new_tag_implication_request_path %>
  • - <% end %> +
  • <%= link_to "Request implication", new_tag_implication_request_path %>
  • <%= link_to "Request bulk update", new_bulk_update_request_path %>
  • <%= link_to "Help", wiki_pages_path(:title => "help:tag_implications") %>
  • diff --git a/app/views/tag_implications/new.html.erb b/app/views/tag_implications/new.html.erb deleted file mode 100644 index 5e4d1952e..000000000 --- a/app/views/tag_implications/new.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -
    -
    -

    New Tag Implication

    - - <%= error_messages_for :tag_implication %> - - <%= simple_form_for(@tag_implication) do |f| %> - <%= f.input :status, :value => "pending", :as => :hidden %> - <%= f.input :antecedent_name, :label => "From" %> - <%= f.input :consequent_name, :label => "To" %> - <%= f.input :forum_topic_id, :label => "Forum" %> - <%= f.button :submit %> - <% end %> -
    -
    - -<%= render "secondary_links" %> - -<% content_for(:page_title) do %> - New Tag Implication - <%= Danbooru.config.app_name %> -<% end %>