/**
  * Returns the ticket post this attachment is attached to.
  *
  * Result is cached until the end of script.
  *
  * @param bool $reload True to reload data from server. False to use the cached value (if present).
  * @return kyTicketPost
  */
 public function getTicketPost($reload = false)
 {
     if ($this->ticket_post !== null && !$reload) {
         return $this->ticket_post;
     }
     if ($this->ticket_id === null || $this->ticket_post_id === null) {
         return null;
     }
     $this->ticket_post = kyTicketPost::get($this->ticket_id, $this->ticket_post_id);
     return $this->ticket_post;
 }