예제 #1
0
 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     // If the user just gave the answer, add the answer text.
     foreach ($xactions as $xaction) {
         $type = $xaction->getTransactionType();
         $new = $xaction->getNewValue();
         if ($type == PonderAnswerTransaction::TYPE_CONTENT) {
             $body->addRawSection($new);
         }
     }
     $body->addTextSection(pht('ANSWER DETAIL'), PhabricatorEnv::getProductionURI($object->getURI()));
     return $body;
 }
 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $header = pht('QUESTION DETAIL');
     $uri = '/Q' . $object->getID();
     foreach ($xactions as $xaction) {
         $type = $xaction->getTransactionType();
         $old = $xaction->getOldValue();
         $new = $xaction->getNewValue();
         // If the user just asked the question, add the question text.
         if ($type == PonderQuestionTransaction::TYPE_CONTENT) {
             if ($old === null) {
                 $body->addRawSection($new);
             }
         }
         // If the user gave an answer, add the answer text. Also update
         // the header and uri to be more answer-specific.
         if ($type == PonderQuestionTransaction::TYPE_ANSWERS) {
             $answer = $this->getAnswer();
             $body->addRawSection($answer->getContent());
             $header = pht('ANSWER DETAIL');
             $uri = $answer->getURI();
         }
     }
     $body->addLinkSection($header, PhabricatorEnv::getProductionURI($uri));
     return $body;
 }
예제 #3
0
 protected function buildMailBody(PhabricatorLiskDAO $object, array $xactions)
 {
     $body = parent::buildMailBody($object, $xactions);
     $header = pht('QUESTION DETAIL');
     $uri = '/Q' . $object->getID();
     foreach ($xactions as $xaction) {
         $type = $xaction->getTransactionType();
         $old = $xaction->getOldValue();
         $new = $xaction->getNewValue();
         // If the user just asked the question, add the question text.
         if ($type == PonderQuestionTransaction::TYPE_CONTENT) {
             if ($old === null) {
                 $body->addRawSection($new);
             }
         }
     }
     $body->addLinkSection($header, PhabricatorEnv::getProductionURI($uri));
     return $body;
 }