summaryrefslogtreecommitdiff
path: root/modules/comment/controllers
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
committerAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
commit0733dc37fda27a5ba35f9020edf3c66aa41a95a0 (patch)
tree6877946232f1b01b1c8709054c689f6658cef34f /modules/comment/controllers
parent218493c50be9362d4abed6900a816308fee5d978 (diff)
parent9379308f91a476f790fb8d444536719535c584e4 (diff)
Merge commit 'upstream/master'
Conflicts: modules/gallery/tests/xss_data.txt
Diffstat (limited to 'modules/comment/controllers')
-rw-r--r--modules/comment/controllers/admin_comments.php8
-rw-r--r--modules/comment/controllers/comments.php8
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_comments.php
index a164f79f..2c278d64 100644
--- a/modules/comment/controllers/admin_comments.php
+++ b/modules/comment/controllers/admin_comments.php
@@ -33,10 +33,10 @@ class Admin_Comments_Controller extends Admin_Controller {
public function menu_labels() {
$menu = $this->_menu($this->_counts());
- print json_encode(array($menu->get("unpublished")->label,
- $menu->get("published")->label,
- $menu->get("spam")->label,
- $menu->get("deleted")->label));
+ print json_encode(array($menu->get("unpublished")->label->for_js(),
+ $menu->get("published")->label->for_js(),
+ $menu->get("spam")->label->for_js(),
+ $menu->get("deleted")->label->for_js()));
}
public function queue($state) {
diff --git a/modules/comment/controllers/comments.php b/modules/comment/controllers/comments.php
index 82b12893..09b9c607 100644
--- a/modules/comment/controllers/comments.php
+++ b/modules/comment/controllers/comments.php
@@ -65,7 +65,7 @@ class Comments_Controller extends REST_Controller {
$form = comment::get_add_form($item);
$valid = $form->validate();
if ($valid) {
- if (user::active()->guest && !$form->add_comment->inputs["name"]->value) {
+ if (identity::active_user()->guest && !$form->add_comment->inputs["name"]->value) {
$form->add_comment->inputs["name"]->add_error("missing", 1);
$valid = false;
}
@@ -78,13 +78,13 @@ class Comments_Controller extends REST_Controller {
if ($valid) {
$comment = comment::create(
- $item, user::active(),
+ $item, identity::active_user(),
$form->add_comment->text->value,
$form->add_comment->inputs["name"]->value,
$form->add_comment->email->value,
$form->add_comment->url->value);
- $active = user::active();
+ $active = identity::active_user();
if ($active->guest) {
$form->add_comment->inputs["name"]->value("");
$form->add_comment->email->value("");
@@ -192,7 +192,7 @@ class Comments_Controller extends REST_Controller {
* @see REST_Controller::form_edit($resource)
*/
public function _form_edit($comment) {
- if (!user::active()->admin) {
+ if (!identity::active_user()->admin) {
access::forbidden();
}
print comment::get_edit_form($comment);