Ejemplo n.º 1
0
 public function unparse_text($contact, $no_title = false)
 {
     global $Conf;
     $x = "===========================================================================\n";
     if (!($this->commentType & COMMENTTYPE_RESPONSE)) {
         $n = "Comment";
     } else {
         if ($rname = $Conf->resp_round_text($this->commentRound)) {
             $n = "{$rname} Response";
         } else {
             $n = "Response";
         }
     }
     if ($contact->can_view_comment_identity($this->prow, $this, false)) {
         $n .= " by " . Text::user_text($this->user());
     }
     $x .= center_word_wrap($n);
     if (!$no_title) {
         $x .= $this->prow->pretty_text_title();
     }
     if ($this->commentTags && $contact->can_view_comment_tags($this->prow, $this, null) && ($tags = $this->viewable_tags($contact))) {
         $tagger = new Tagger($contact);
         $x .= center_word_wrap($tagger->unparse_hashed($tags));
     }
     $x .= "---------------------------------------------------------------------------\n";
     if ($this->commentOverflow) {
         $x .= $this->commentOverflow;
     } else {
         $x .= $this->comment;
     }
     return $x . "\n";
 }