From 26997b1b5979b826855187a829fbd927df5a08d5 Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 29 Apr 2007 01:37:49 +0000 Subject: [PATCH] misc fixes git-svn-id: file:///home/shish/svn/shimmie2/trunk@35 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/comment.ext.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ext/comment.ext.php b/ext/comment.ext.php index aa1ba7dc..eff09947 100644 --- a/ext/comment.ext.php +++ b/ext/comment.ext.php @@ -122,11 +122,11 @@ class CommentList extends Extension { $event->panel->add_main_block($sb); } if(is_a($event, 'ConfigSaveEvent')) { - $event->config->set_bool("comment_anon", $_POST['comment_anon']); - $event->config->set_int("comment_limit", $_POST['comment_limit']); - $event->config->set_int("comment_window", $_POST['comment_window']); - $event->config->set_int("comment_count", $_POST['comment_count']); - $event->config->set_string("comment_wordpress_key", $_POST['comment_wordpress_key']); + $event->config->set_bool_from_post("comment_anon"); + $event->config->set_int_from_post("comment_limit"); + $event->config->set_int_from_post("comment_window"); + $event->config->set_int_from_post("comment_count"); + $event->config->set_string_from_post("comment_wordpress_key"); } } // }}} @@ -335,6 +335,7 @@ class CommentList extends Extension { private function can_comment() { global $config; + global $user; return ($config->get_bool('comment_anon') || !$user->is_anonymous()); }