Modified: trunk/lib/rest.rb (2331 => 2332)
--- trunk/lib/rest.rb 2010-02-11 15:24:53 UTC (rev 2331)
+++ trunk/lib/rest.rb 2010-02-11 15:56:30 UTC (rev 2332)
@@ -1664,6 +1664,16 @@
# Start of curation hack
+ def match_tag_name(name)
+ matches = []
+
+ Conf.curation_types.each do |type|
+ matches.push type if type.starts_with?(name)
+ end
+
+ return matches[0] if matches.length == 1
+ end
+
if comment[0..1].downcase == 'c:' && user && subject &&
Conf.curators.include?(user.username)
@@ -1691,8 +1701,10 @@
bit.downcase!
bit.strip!
- if Conf.curation_types.include?(bit)
- events.push(CurationEvent.new(:category => bit,
+ curation_type = match_tag_name(bit)
+
+ if curation_type
+ events.push(CurationEvent.new(:category => curation_type,
:object => subject, :user => user, :details => details))
else
failed = true