diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v4/db_import.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v4/db_remove.rb | 8 | ||||
-rw-r--r-- | lib/sisu/v5/db_import.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v5/db_remove.rb | 8 |
4 files changed, 12 insertions, 12 deletions
diff --git a/lib/sisu/v4/db_import.rb b/lib/sisu/v4/db_import.rb index 199d4efa..a4251a98 100644 --- a/lib/sisu/v4/db_import.rb +++ b/lib/sisu/v4/db_import.rb @@ -129,9 +129,9 @@ module SiSU_DbImport select_first_match=%{ SELECT metadata_and_text.tid FROM metadata_and_text - WHERE metadata_and_text.src_filename = '#{@opt.fns}' + WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns file_exist=@sql_type=~/sqlite/ \ ? @conn.get_first_value(select_first_match) : @conn.select_one(select_first_match) diff --git a/lib/sisu/v4/db_remove.rb b/lib/sisu/v4/db_remove.rb index 740977d0..c402f959 100644 --- a/lib/sisu/v4/db_remove.rb +++ b/lib/sisu/v4/db_remove.rb @@ -78,17 +78,17 @@ module SiSU_DbRemove remove_selected=%{ SELECT tid FROM metadata_and_text - WHERE src_filename = '#{@opt.fns}' + WHERE src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns @conn.get_first_value(remove_selected).to_i else remove_selected=%{ SELECT metadata_and_text.tid FROM metadata_and_text - WHERE metadata_and_text.src_filename = '#{@opt.fns}' + WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns x=@conn.select_one(remove_selected) x ? (x.join.to_i) : nil end diff --git a/lib/sisu/v5/db_import.rb b/lib/sisu/v5/db_import.rb index a1d332bb..293071ff 100644 --- a/lib/sisu/v5/db_import.rb +++ b/lib/sisu/v5/db_import.rb @@ -129,9 +129,9 @@ module SiSU_DbImport select_first_match=%{ SELECT metadata_and_text.tid FROM metadata_and_text - WHERE metadata_and_text.src_filename = '#{@opt.fns}' + WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns file_exist=@sql_type=~/sqlite/ \ ? @conn.get_first_value(select_first_match) : @conn.select_one(select_first_match) diff --git a/lib/sisu/v5/db_remove.rb b/lib/sisu/v5/db_remove.rb index 1fb40e30..2e65d51a 100644 --- a/lib/sisu/v5/db_remove.rb +++ b/lib/sisu/v5/db_remove.rb @@ -78,17 +78,17 @@ module SiSU_DbRemove remove_selected=%{ SELECT tid FROM metadata_and_text - WHERE src_filename = '#{@opt.fns}' + WHERE src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns @conn.get_first_value(remove_selected).to_i else remove_selected=%{ SELECT metadata_and_text.tid FROM metadata_and_text - WHERE metadata_and_text.src_filename = '#{@opt.fns}' + WHERE metadata_and_text.src_filename = '#{@md.fns}' AND metadata_and_text.language_document_char = '#{@opt.lng}' - ;} + ;} # note, for .ssm: @md.fns (is set during runtime & is) != @opt.fns @md.opt.fns x=@conn.select_one(remove_selected) x ? (x.join.to_i) : nil end |