aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/db_remove.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-12-12 14:58:58 -0500
committerRalph Amissah <ralph@amissah.com>2012-12-12 14:58:58 -0500
commit1beb5aa3c376dbef89bc33024216650529ef7262 (patch)
tree1682500089c14fd49bcf52a3a001e291fadd5f75 /lib/sisu/v3/db_remove.rb
parentdebian/changelog (3.3.2-1) (diff)
parentv3: 3.3.3 version & changelog, dates touched (diff)
Merge tag 'sisu_3.3.3' into debian/sid
Diffstat (limited to 'lib/sisu/v3/db_remove.rb')
-rw-r--r--lib/sisu/v3/db_remove.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/sisu/v3/db_remove.rb b/lib/sisu/v3/db_remove.rb
index 6d481cb4..3371a9be 100644
--- a/lib/sisu/v3/db_remove.rb
+++ b/lib/sisu/v3/db_remove.rb
@@ -71,19 +71,21 @@ module SiSU_DbRemove
: false
end
del_id=if driver_sqlite3
- @conn.get_first_value(%{
+ remove_selected=%{
SELECT tid
FROM metadata_and_text
WHERE src_filename = '#{@opt.fns}'
AND metadata_and_text.language_document_char = '#{@opt.lng}'
- ;}).to_i
+ ;}
+ @conn.get_first_value(remove_selected).to_i
else
- x=@conn.select_one(%{
+ remove_selected=%{
SELECT metadata_and_text.tid
FROM metadata_and_text
WHERE metadata_and_text.src_filename = '#{@opt.fns}'
AND metadata_and_text.language_document_char = '#{@opt.lng}'
- ;})
+ ;}
+ x=@conn.select_one(remove_selected)
x ? (x.join.to_i) : nil
end
if del_id