From 6dc88be6b6828a968409167e9f3c57a1bb9ec79c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 20 Jan 2010 22:50:20 -0800 Subject: Stop using MY_ORM::original(). --- modules/comment/models/comment.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/comment/models') diff --git a/modules/comment/models/comment.php b/modules/comment/models/comment.php index 69b8505e..43c4148f 100644 --- a/modules/comment/models/comment.php +++ b/modules/comment/models/comment.php @@ -102,13 +102,14 @@ class Comment_Model extends ORM { $this->server_remote_host = substr($input->server("REMOTE_HOST"), 0, 64); $this->server_remote_port = substr($input->server("REMOTE_PORT"), 0, 16); } - $visible_change = $this->original()->state == "published" || $this->state == "published"; + + $visible_change = $this->state == "published"; parent::save(); module::event("comment_created", $this); } else { // Updated comment - $visible_change = $this->original()->state == "published" || $this->state == "published"; - $original = clone $this->original(); + $original = ORM::factory("comment")->where("id", "=", $this->id)->find(); + $visible_change = $original->state == "published" || $this->state == "published"; parent::save(); module::event("comment_updated", $original, $this); } -- cgit v1.2.3