From 65962a591a70985b1de772cea403b3cfcdb5c6dc Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 26 Apr 2010 05:03:58 +0100 Subject: [PATCH] Revert "search field autocomplete" This reverts commit 29d9c7ae1600abd8f0136776daef16c9a23d2b8b. zshall has already done this, better >_< --- ext/index/main.php | 22 ---------------------- ext/index/theme.php | 4 ---- 2 files changed, 26 deletions(-) diff --git a/ext/index/main.php b/ext/index/main.php index 3c7f8c6b..bcd68240 100644 --- a/ext/index/main.php +++ b/ext/index/main.php @@ -173,28 +173,6 @@ class Index extends SimpleExtension { $this->theme->display_page($page, $images); } } - - if($event->page_matches("api/internal/index/get_tags")) { - $page->set_mode("data"); - $page->set_type("text/plain"); - - $term = ltrim($_GET["term"]); - $space_pos = strrpos($term, " "); - $pre = ""; - $term_only = $term; - if($space_pos !== FALSE) { - $pre = substr($term, 0, $space_pos+1); - $term_only = substr($term, $space_pos+1); - } - - $all = $database->get_all( - "SELECT tag FROM tags WHERE tag LIKE ? LIMIT 10", - array($term_only."%")); - - $res = array(); - foreach($all as $row) {$res[] = $pre.$row["tag"];} - $page->set_data(json_encode($res)); - } } public function onSetupBuilding($event) { diff --git a/ext/index/theme.php b/ext/index/theme.php index 6651fa5c..e2efd36d 100644 --- a/ext/index/theme.php +++ b/ext/index/theme.php @@ -82,10 +82,6 @@ EOD;