item_id); } function author() { return user::lookup($this->author_id); } function author_name() { $author = $this->author(); if ($author->guest) { return $this->guest_name; } else { return $author->full_name; } } function author_email() { $author = $this->author(); if ($author->guest) { return $this->guest_email; } else { return $author->email; } } function author_url() { $author = $this->author(); if ($author->guest) { return $this->guest_url; } else { 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(); } }