summaryrefslogtreecommitdiff
path: root/modules/tag/controllers
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-08-06 21:36:32 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-08-06 21:36:32 +0000
commit691ce806dc9aefac596a692ff2ba927a81a65440 (patch)
tree410f64288ef1d8bbc8455509af74d0e7582dc48e /modules/tag/controllers
parentc83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (diff)
parent8559cdb5b6bfa87864941f726521660023779fa7 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r--modules/tag/controllers/admin_tags.php13
-rw-r--r--modules/tag/controllers/tags.php6
2 files changed, 7 insertions, 12 deletions
diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php
index 9e875d14..0c82579b 100644
--- a/modules/tag/controllers/admin_tags.php
+++ b/modules/tag/controllers/admin_tags.php
@@ -57,11 +57,9 @@ class Admin_Tags_Controller extends Admin_Controller {
message::success(t("Deleted tag %tag_name", array("tag_name" => $name)));
log::success("tags", t("Deleted tag %tag_name", array("tag_name" => $name)));
- print json_encode(
- array("result" => "success",
- "location" => url::site("admin/tags")));
+ json::reply(array("result" => "success", "location" => url::site("admin/tags")));
} else {
- print json_encode(array("result" => "error", "form" => (string) $form));
+ print $form;
}
}
@@ -93,15 +91,14 @@ class Admin_Tags_Controller extends Admin_Controller {
$tag->name = $in_place_edit->value();
$tag->save();
- $message = t("Renamed tag %old_name to %new_name",
+ $message = t("Renamed tag <b>%old_name</b> to <b>%new_name</b>",
array("old_name" => $old_name, "new_name" => $tag->name));
message::success($message);
log::success("tags", $message);
- print json_encode(array("result" => "success",
- "location" => url::site("admin/tags")));
+ json::reply(array("result" => "success", "location" => url::site("admin/tags")));
} else {
- print json_encode(array("result" => "error", "form" => $in_place_edit->render()));
+ json::reply(array("result" => "error", "form" => (string)$in_place_edit->render()));
}
}
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php
index f3d456d3..bc657644 100644
--- a/modules/tag/controllers/tags.php
+++ b/modules/tag/controllers/tags.php
@@ -67,11 +67,9 @@ class Tags_Controller extends Controller {
}
}
- print json_encode(
- array("result" => "success",
- "cloud" => (string)tag::cloud(30)));
+ json::reply(array("result" => "success", "cloud" => (string)tag::cloud(30)));
} else {
- print json_encode(array("result" => "error", "form" => (string) $form));
+ json::reply(array("result" => "error", "html" => (string)$form));
}
}