make sure s is set

This commit is contained in:
Shish 2012-01-26 18:03:04 +00:00
parent 96b8253b38
commit ad9dcfe926

View File

@ -47,6 +47,8 @@ class TagList implements Extension {
} }
if(($event instanceof PageRequestEvent) && $event->page_matches("api/internal/tag_list/complete")) { if(($event instanceof PageRequestEvent) && $event->page_matches("api/internal/tag_list/complete")) {
if(!isset($_GET["s"])) return;
$all = $database->get_all( $all = $database->get_all(
"SELECT tag FROM tags WHERE tag LIKE :search AND count > 0 LIMIT 10", "SELECT tag FROM tags WHERE tag LIKE :search AND count > 0 LIMIT 10",
array("search"=>$_GET["s"]."%")); array("search"=>$_GET["s"]."%"));