misc/plugin/my-sequel.rb in tdiary-5.0.7 vs misc/plugin/my-sequel.rb in tdiary-5.0.8

- old
+ new

@@ -204,23 +204,23 @@ # add an entry to Array value of hash, making new Array if needed def self::push_to_hash(hash, key, element) unless hash.has_key?(key) hash[key] = Array.new begin - hash[key].taint + hash[key] rescue SecurityError end end hash[key] << element hash end def initialize(cache_path) - @link_srcs = Hash.new.taint # key:dst anchor value:Array of src anchors - @current_dsts = Hash.new.taint # key:src anchor value:Array of dst anchors - @cached_dsts = Hash.new.taint # for restore_dsts and clean_srcs - @vanished_dsts = Hash.new.taint # key:src date value:Array of dst anchors + @link_srcs = Hash.new # key:dst anchor value:Array of src anchors + @current_dsts = Hash.new # key:src anchor value:Array of dst anchors + @cached_dsts = Hash.new # for restore_dsts and clean_srcs + @vanished_dsts = Hash.new # key:src date value:Array of dst anchors @cache_path = cache_path end def restore(dates) restore_srcs(dates) @@ -254,11 +254,11 @@ datestr = MySequel.date(date) @current_dsts.keys.each do |src_anchor| next unless MySequel.date(src_anchor) == datestr @current_dsts[src_anchor] = Array.new begin - @current_dsts[src_anchor].taint + @current_dsts[src_anchor] rescue SecurityError end end end @@ -309,13 +309,13 @@ @srcs_loaded ||= Hash.new MySequel.each_cache_key(dates) do |cache_key| unless @srcs_loaded[cache_key] then each_cached(cache_key, 'src') do |anchor, array| unless @link_srcs.has_key?(anchor) - @link_srcs[anchor] = array.taint + @link_srcs[anchor] = array else - @link_srcs[anchor] += array.taint + @link_srcs[anchor] += array end end @srcs_loaded[cache_key] = true end end @@ -325,11 +325,10 @@ def restore_dsts(dates) @dsts_loaded ||= Hash.new MySequel.each_cache_key(dates) do |cache_key| unless @dsts_loaded[cache_key] then each_cached(cache_key, 'dst') do |anchor, array| - array.taint @cached_dsts[anchor] = array @current_dsts[anchor] = array.dup end @dsts_loaded[cache_key] = true end @@ -385,10 +384,10 @@ end end store(hash_for_cache(@link_srcs, 'src')) store(hash_for_cache(@current_dsts, 'dst')) - @vanished_dsts = Hash.new.taint + @vanished_dsts = Hash.new end end # register this plguin to tDiary