mirror of
https://github.com/moebooru/moebooru
synced 2025-08-30 21:45:13 +00:00
Remove trailing comma of last item.
This commit is contained in:
@@ -150,7 +150,7 @@ class HistoryController < ApplicationController
|
||||
@options = {
|
||||
:show_all_tags => params[:show_all_tags] == "1",
|
||||
:specific_object => (q.key?(:type) && q.key?(:id)),
|
||||
:specific_history => q.key?(:change),
|
||||
:specific_history => q.key?(:change)
|
||||
}
|
||||
|
||||
@options[:show_name] = false
|
||||
|
@@ -10,7 +10,7 @@ module HistoryHelper
|
||||
# :show_all_tags: Show unchanged tags.
|
||||
def get_default_field_options
|
||||
@default_field_options ||= {
|
||||
:suppress_fields => [],
|
||||
:suppress_fields => []
|
||||
}
|
||||
end
|
||||
|
||||
@@ -48,7 +48,7 @@ module HistoryHelper
|
||||
:Post => {
|
||||
:fields => {
|
||||
:cached_tags => { :primary_order => 2 }, # show tag changes after other things
|
||||
:source => { :primary_order => 3 },
|
||||
:source => { :primary_order => 3 }
|
||||
},
|
||||
:never_obsolete => { :cached_tags => true } # tags handle obsolete themselves per-tag
|
||||
},
|
||||
@@ -70,15 +70,15 @@ module HistoryHelper
|
||||
:suppress_fields => [:sequence], # changing active usually changes sequence; this isn't interesting
|
||||
:primary_order => 2, # show pool post changes after other things
|
||||
},
|
||||
:cached_tags => {},
|
||||
},
|
||||
:cached_tags => {}
|
||||
}
|
||||
},
|
||||
|
||||
:Tag => {
|
||||
},
|
||||
|
||||
:Note => {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@att_options.each_key do |classname|
|
||||
@@ -86,7 +86,7 @@ module HistoryHelper
|
||||
:fields => {},
|
||||
:primary_order => 1,
|
||||
:never_obsolete => {},
|
||||
:force_show_initial => {},
|
||||
:force_show_initial => {}
|
||||
}.merge(@att_options[classname])
|
||||
|
||||
c = @att_options[classname][:fields]
|
||||
@@ -400,7 +400,7 @@ module HistoryHelper
|
||||
{
|
||||
:html => span,
|
||||
:field => change.column_name,
|
||||
:sort_key => sort_key,
|
||||
:sort_key => sort_key
|
||||
}
|
||||
end
|
||||
|
||||
|
@@ -15,7 +15,7 @@ module PoolHelper
|
||||
def link_to_pool_zip(text, pool, zip_params, options = {})
|
||||
text = "%s%s (%s)" % [text,
|
||||
options[:has_jpeg] ? " PNGs" : "",
|
||||
number_to_human_size(pool.get_zip_size(zip_params).to_i),
|
||||
number_to_human_size(pool.get_zip_size(zip_params).to_i)
|
||||
]
|
||||
options = { :action => "zip", :id => pool.id, :filename => pool.get_zip_filename(zip_params) }
|
||||
options[:jpeg] = 1 if zip_params[:jpeg]
|
||||
|
@@ -37,7 +37,7 @@ class FlaggedPostDetail < ActiveRecord::Base
|
||||
ret = {
|
||||
:post_id => post_id,
|
||||
:reason => reason,
|
||||
:created_at => created_at,
|
||||
:created_at => created_at
|
||||
}
|
||||
|
||||
unless hide_user then
|
||||
|
@@ -321,7 +321,7 @@ class InlineImage < ActiveRecord::Base
|
||||
:description => description,
|
||||
:file_url => file_url,
|
||||
:sample_url => sample_url,
|
||||
:preview_url => preview_url,
|
||||
:preview_url => preview_url
|
||||
}
|
||||
end
|
||||
|
||||
|
@@ -160,7 +160,7 @@ class Pool < ActiveRecord::Base
|
||||
:user_id => user_id,
|
||||
:is_public => is_public,
|
||||
:post_count => post_count,
|
||||
:description => description,
|
||||
:description => description
|
||||
}
|
||||
end
|
||||
|
||||
|
@@ -42,7 +42,7 @@ class PoolPost < ActiveRecord::Base
|
||||
:active => active,
|
||||
:sequence => sequence,
|
||||
:next_post_id => next_post_id,
|
||||
:prev_post_id => prev_post_id,
|
||||
:prev_post_id => prev_post_id
|
||||
}
|
||||
end
|
||||
|
||||
|
@@ -38,7 +38,7 @@ module Post::ApiMethods
|
||||
:frames_pending_string => frames_pending,
|
||||
:frames_pending => frames_api_data(frames_pending),
|
||||
:frames_string => frames,
|
||||
:frames => frames_api_data(frames),
|
||||
:frames => frames_api_data(frames)
|
||||
}
|
||||
|
||||
if status == "deleted"
|
||||
@@ -74,7 +74,7 @@ module Post::ApiMethods
|
||||
def api_data
|
||||
{
|
||||
:post => self,
|
||||
:tags => Tag.batch_get_tag_types_for_posts([self]),
|
||||
:tags => Tag.batch_get_tag_types_for_posts([self])
|
||||
}
|
||||
end
|
||||
|
||||
|
@@ -42,7 +42,7 @@ module Post::TagMethods
|
||||
:removed_tags => old_tags - new_tags,
|
||||
:unchanged_tags => new_tags & old_tags,
|
||||
:obsolete_added_tags => (new_tags - old_tags) - latest_tags,
|
||||
:obsolete_removed_tags => (old_tags - new_tags) & latest_tags,
|
||||
:obsolete_removed_tags => (old_tags - new_tags) & latest_tags
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@@ -80,7 +80,7 @@ class PostTagHistory < ActiveRecord::Base
|
||||
:removed_tags => old_tags - new_tags,
|
||||
:unchanged_tags => new_tags & old_tags,
|
||||
:obsolete_added_tags => (new_tags - old_tags) - latest_tags,
|
||||
:obsolete_removed_tags => (old_tags - new_tags) & latest_tags,
|
||||
:obsolete_removed_tags => (old_tags - new_tags) & latest_tags
|
||||
}
|
||||
end
|
||||
|
||||
|
@@ -174,7 +174,7 @@ CONFIG["local_image_service"] = ""
|
||||
CONFIG["image_service_list"] = {
|
||||
"danbooru.donmai.us" => "http://haruhidoujins.yi.org/multi-search.xml",
|
||||
"moe.imouto.org" => "http://haruhidoujins.yi.org/multi-search.xml",
|
||||
"konachan.com" => "http://haruhidoujins.yi.org/multi-search.xml",
|
||||
"konachan.com" => "http://haruhidoujins.yi.org/multi-search.xml"
|
||||
}
|
||||
|
||||
# If true, image services receive a URL to the thumbnail for searching, which
|
||||
|
@@ -110,5 +110,5 @@ CONFIG["language_names"] = {
|
||||
"en" => "English",
|
||||
"zh" => "Chinese",
|
||||
"ja" => "Japanese",
|
||||
"es" => "Spanish",
|
||||
"es" => "Spanish"
|
||||
}
|
||||
|
@@ -57,14 +57,14 @@ module SimilarImages
|
||||
if search_url
|
||||
params += [{
|
||||
:name => "url",
|
||||
:data => search_url,
|
||||
:data => search_url
|
||||
}]
|
||||
else
|
||||
params += [{
|
||||
:name => "file",
|
||||
:binary => true,
|
||||
:data => source_file,
|
||||
:filename => File.basename(source_filename),
|
||||
:filename => File.basename(source_filename)
|
||||
}]
|
||||
end
|
||||
|
||||
|
@@ -150,7 +150,7 @@ module ActiveRecord
|
||||
opt = {
|
||||
:class => to_s.to_sym,
|
||||
:controller => to_s,
|
||||
:action => "show",
|
||||
:action => "show"
|
||||
}.merge(options)
|
||||
|
||||
unless opt[:foreign_key]
|
||||
|
@@ -95,7 +95,7 @@ class ApplicationTest < ActiveSupport::TestCase
|
||||
{ :rating => "e" }, { :rating => "s" },
|
||||
|
||||
# rating code path is different for metatags:
|
||||
{ :tags => "rating:e" }, { :tags => "rating:s" },
|
||||
{ :tags => "rating:e" }, { :tags => "rating:s" }
|
||||
],
|
||||
# changing either way from s -> e -> s should invalidate both s and e
|
||||
:affected_searches => ["rating:s", "rating:e", "-rating:s", "-rating:e", "id:1", "pool:#{pool_id}"]
|
||||
@@ -114,10 +114,10 @@ class ApplicationTest < ActiveSupport::TestCase
|
||||
{ :tags => "pool:dummy" },
|
||||
{ :tags => "-pool:dummy" },
|
||||
{ :tags => "pool:#{pool_id}" },
|
||||
{ :tags => "-pool:#{pool_id}" },
|
||||
{ :tags => "-pool:#{pool_id}" }
|
||||
],
|
||||
:affected_searches => ["pool:dummy", "pool:#{pool_id}"]
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
tests.each do |test|
|
||||
|
Reference in New Issue
Block a user