author search from nagel
This commit is contained in:
parent
b52651c558
commit
b1d1d71093
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user