lib/include/class_log.rb in knjappserver-0.0.20 vs lib/include/class_log.rb in knjappserver-0.0.21
- old
+ new
@@ -23,9 +23,16 @@
ret = list_helper(d)
d.args.each do |key, val|
case key
when "object_lookup"
sql << " AND Log_link.id IS NOT NULL"
+ when "tag"
+ data_val = d.ob.get_by(:Log_data_value, {"value" => val})
+ if !data_val
+ sql << " AND false"
+ else
+ sql << " AND Log.tag_data_id = '#{d.db.esc(data_val.id)}'"
+ end
else
raise "Invalid key: #{key}."
end
end
\ No newline at end of file