diff options
author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-02-10 20:57:53 +0000 |
---|---|---|
committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-02-10 20:57:53 +0000 |
commit | 10e36fcf1b5acf07c5cc128105af03fb09aac89e (patch) | |
tree | c5e815b0a4c540d0dc7bc5f90dd1eae3df31017e /modules/tag/controllers | |
parent | 052476ef44ca801766cbd6bdbfe42d5a0a362e52 (diff) | |
parent | 8ef08d20883d9b9aa0b7560ce3bf6da8a6632149 (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r-- | modules/tag/controllers/tags.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index 1eede907..04400d73 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -60,7 +60,7 @@ class Tags_Controller extends Controller { $form = tag::get_add_form($item); if ($form->validate()) { - foreach (split(",", $form->add_tag->inputs["name"]->value) as $tag_name) { + foreach (explode(",", $form->add_tag->inputs["name"]->value) as $tag_name) { $tag_name = trim($tag_name); if ($tag_name) { $tag = tag::add($item, $tag_name); @@ -77,9 +77,9 @@ class Tags_Controller extends Controller { public function autocomplete() { $tags = array(); - $tag_parts = preg_split("#,#", Input::instance()->get("q")); + $tag_parts = explode(",", Input::instance()->get("q")); $limit = Input::instance()->get("limit"); - $tag_part = end($tag_parts); + $tag_part = ltrim(end($tag_parts)); $tag_list = ORM::factory("tag") ->where("name", "LIKE", "{$tag_part}%") ->order_by("name", "ASC") |