|
@@ -149,9 +149,9 @@ class CreatePattern < Riddl::Implementation
|
|
|
$db.execute("INSERT INTO stationpattern (station, internalID, description, date) VALUES (?,?,?,?)", [@r.last, id, doc.xpath("/*/@description")[0].value, doc.xpath("/*/@changed")[0].value])
|
|
|
|
|
|
doc.xpath(".//parts/*").each do |node|
|
|
|
- if(node.text != "")
|
|
|
+ #if(node.text != "")
|
|
|
$db.execute("INSERT INTO pattern (internalID, type, value) VALUES (?,?,?)", [id, node.name, node.text])
|
|
|
- end
|
|
|
+ #end
|
|
|
end
|
|
|
|
|
|
ret = {:id => id}
|
|
@@ -188,9 +188,9 @@ class UpdatePattern < Riddl::Implementation
|
|
|
$db.execute("DELETE FROM pattern WHERE internalID = ?", [@r[1]])
|
|
|
|
|
|
doc.xpath(".//parts/*").each do |node|
|
|
|
- if(node.text != "")
|
|
|
+ #if(node.text != "")
|
|
|
$db.execute("INSERT INTO pattern (internalID, type, value) VALUES (?,?,?)", [@r[1], node.name, node.text])
|
|
|
- end
|
|
|
+ #end
|
|
|
end
|
|
|
end
|
|
|
end
|
|
@@ -225,12 +225,6 @@ class DuplicatePattern < Riddl::Implementation
|
|
|
$db.execute( "INSERT INTO pattern values (?,?,?)", row)
|
|
|
end
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
#duplicate error
|
|
|
|
|
@@ -645,6 +639,7 @@ class SearchImages < Riddl::Implementation
|
|
|
searchstring = searchstring + " AND " + pattern.map{ |key, val| key + ".type == '" + key + "' AND (" + key + ".value == '"+ val +"' or " + key + ".value == '*')"}.join(' AND ') + " ORDER BY ID ASC"
|
|
|
result = $db.execute searchstring;
|
|
|
|
|
|
+ puts searchstring
|
|
|
|
|
|
#Search for images with one or multiple found patternIDs
|
|
|
ret = []
|