diff options
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r-- | modules/comment/helpers/comment.php | 2 | ||||
-rw-r--r-- | modules/comment/helpers/comment_block.php | 2 | ||||
-rw-r--r-- | modules/comment/helpers/comment_installer.php | 6 |
3 files changed, 3 insertions, 7 deletions
diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 82f31747..c0864fee 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -54,7 +54,7 @@ class comment_Core { if (module::is_installed("spam_filter") && TEST_MODE == 0) { SpamFilter::instance()->check_comment($comment); } else { - $comment->published = true; + $comment->state = "published"; } $comment->save(); diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php index ce748036..9a104baf 100644 --- a/modules/comment/helpers/comment_block.php +++ b/modules/comment/helpers/comment_block.php @@ -32,7 +32,7 @@ class comment_block_Core { $view = new View("comments.html"); $view->comments = ORM::factory("comment") ->where("item_id", $theme->item()->id) - ->where("published", 1) + ->where("state", "published") ->orderby("created", "ASC") ->find_all(); diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index 3e7b2f49..dbbb511f 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -23,10 +23,6 @@ class comment_installer { $version = module::get_version("comment"); if ($version == 0) { - /** - * @todo change published flag to char(xx) with values published, unpublished, moderation - * unreviewed, spam - */ $db->query("CREATE TABLE IF NOT EXISTS `comments` ( `id` int(9) NOT NULL auto_increment, `author` varchar(128) default NULL, @@ -35,7 +31,7 @@ class comment_installer { `created` int(9) NOT NULL, `item_id` int(9) NOT NULL, `url` varchar(255) default NULL, - `published` boolean default 1, + `state` char(15) default 'unpublished', `ip_addr` char(15) default NULL, `user_agent` varchar(255) default NULL, `spam_signature` varchar(255) default NULL, |