search for ratings with full words

This commit is contained in:
Shish 2009-08-02 08:43:00 +01:00
parent 6f67a134ff
commit 556d3b50ec

View File

@ -125,6 +125,11 @@ class Ratings implements Extension {
$set = join(', ', $arr);
$event->add_querylet(new Querylet("rating IN ($set)"));
}
if(preg_match("/^rating=(safe|questionable|explicit|unknown)$/", strtolower($event->term), $matches)) {
$text = $matches[1];
$char = $text[0];
$event->add_querylet(new Querylet("rating = ?", array($char)));
}
}
}