summaryrefslogtreecommitdiff
path: root/modules/tag
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2012-06-01 15:10:46 +0000
committerNathan Kinkade <nath@nkinka.de>2012-06-01 15:10:46 +0000
commitb52e834bd0bab530e98537d52b31d4b37f199739 (patch)
treeff31dd4f6c2afaeae380f10dc691cde3cb4e6739 /modules/tag
parentf5098f54b8279f468d94747b1156e15ea05d6d25 (diff)
parent4c98b218316df00c8bf3eeb28a8324ec64348bff (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/tag')
-rw-r--r--modules/tag/controllers/admin_tags.php2
-rw-r--r--modules/tag/controllers/tags.php4
-rw-r--r--modules/tag/helpers/tag_event.php4
-rw-r--r--modules/tag/views/tag_block.html.php2
4 files changed, 6 insertions, 6 deletions
diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php
index ff69ad94..515b6891 100644
--- a/modules/tag/controllers/admin_tags.php
+++ b/modules/tag/controllers/admin_tags.php
@@ -58,7 +58,7 @@ class Admin_Tags_Controller extends Admin_Controller {
json::reply(array("result" => "success", "location" => url::site("admin/tags")));
} else {
- print $form;
+ json::reply(array("result" => "error", "html" => (string)$form));
}
}
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php
index edb8c89b..9af3843e 100644
--- a/modules/tag/controllers/tags.php
+++ b/modules/tag/controllers/tags.php
@@ -57,9 +57,9 @@ class Tags_Controller extends Controller {
->limit($limit)
->find_all();
foreach ($tag_list as $tag) {
- $tags[] = $tag->name;
+ $tags[] = html::clean($tag->name);
}
- print implode("\n", $tags);
+ ajax::response(implode("\n", $tags));
}
}
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index d4f1c757..d2757219 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -72,7 +72,7 @@ class tag_event_Core {
$url = url::site("tags/autocomplete");
$form->script("")
->text("$('form input[name=tags]').ready(function() {
- $('form input[name=tags]').autocomplete(
+ $('form input[name=tags]').gallery_autocomplete(
'$url', {max: 30, multiple: true, multipleSeparator: ',', cacheLength: 1});
});");
@@ -123,7 +123,7 @@ class tag_event_Core {
$autocomplete_url = url::site("tags/autocomplete");
$group->script("")
->text("$('input[name=tags]')
- .autocomplete(
+ .gallery_autocomplete(
'$autocomplete_url',
{max: 30, multiple: true, multipleSeparator: ',', cacheLength: 1}
)
diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php
index 98fa0d4f..d25b8dcb 100644
--- a/modules/tag/views/tag_block.html.php
+++ b/modules/tag/views/tag_block.html.php
@@ -2,7 +2,7 @@
<script type="text/javascript">
$("#g-add-tag-form").ready(function() {
var url = $("#g-tag-cloud-autocomplete-url").attr("href");
- $("#g-add-tag-form input:text").autocomplete(
+ $("#g-add-tag-form input:text").gallery_autocomplete(
url, {
max: 30,
multiple: true,