summaryrefslogtreecommitdiff
path: root/modules/tag/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2013-02-03 18:48:30 -0500
committerBharat Mediratta <bharat@menalto.com>2013-02-03 18:55:23 -0500
commit0494244e8068198707bf602199413cd216b0d515 (patch)
tree59d31d59047c85c13a8061165a453f86aa501510 /modules/tag/controllers
parentdece6dc5a5880c6267431ba3299c5758b38662ee (diff)
Super first pass:
- jQuery 1.90 - jQuery UI 1.10 - Superfish 1.5.1 (minus all plugins) - jQuery Form 3.26.0-2013.01.28 Deleted all other jQuery plugins for now. - Reworked autocomplete to use the latest jQuery code. - Deleted references to $.browser.msie, no longer supported - Basic CSS support for autocomplete - lots more work needed there
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r--modules/tag/controllers/tags.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php
index 77d45a95..32e857c6 100644
--- a/modules/tag/controllers/tags.php
+++ b/modules/tag/controllers/tags.php
@@ -48,18 +48,17 @@ class Tags_Controller extends Controller {
public function autocomplete() {
$tags = array();
- $tag_parts = explode(",", Input::instance()->get("q"));
- $limit = Input::instance()->get("limit");
+ $tag_parts = explode(",", Input::instance()->get("term"));
$tag_part = ltrim(end($tag_parts));
$tag_list = ORM::factory("tag")
->where("name", "LIKE", Database::escape_for_like($tag_part) . "%")
->order_by("name", "ASC")
- ->limit($limit)
+ ->limit(100)
->find_all();
foreach ($tag_list as $tag) {
- $tags[] = html::clean($tag->name);
+ $tags[] = (string)html::clean($tag->name);
}
- ajax::response(implode("\n", $tags));
+ ajax::response(json_encode($tags));
}
}