author search from nagel

This commit is contained in:
Shish 2012-01-18 17:53:52 +00:00
parent b52651c558
commit b1d1d71093

View File

@ -43,6 +43,14 @@ class Artists implements Extension {
if ($event instanceof PageRequestEvent)
$this->handle_commands($event);
if ($event instanceof SearchTermParseEvent) {
$matches = array();
if(preg_match("/^author=(.*)$/", $event->term, $matches)) {
$char = $matches[1];
$event->add_querylet(new Querylet("Author = :author_char", array("author_char"=>$char)));
}
}
}
public function try_install() {