diff options
Diffstat (limited to 'modules/comment/models')
-rw-r--r-- | modules/comment/models/comment.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/comment/models/comment.php b/modules/comment/models/comment.php index c83b2721..989597a8 100644 --- a/modules/comment/models/comment.php +++ b/modules/comment/models/comment.php @@ -52,4 +52,17 @@ class Comment_Model extends ORM { return $author->url; } } + + /** + * @see ORM::save() + */ + public function save() { + if (!empty($this->changed)) { + $this->updated = time(); + if (!$this->loaded) { + $this->created = $this->updated; + } + } + return parent::save(); + } } |