コード例 #1
0
 protected function prepareBody()
 {
     parent::prepareBody();
     $inline_max_length = PhabricatorEnv::getEnvConfig('metamta.differential.inline-patches');
     if ($inline_max_length) {
         $patch = $this->buildPatch();
         if (count(explode("\n", $patch)) <= $inline_max_length) {
             $this->patch = $patch;
         }
     }
 }
コード例 #2
0
 protected function prepareBody()
 {
     parent::prepareBody();
     // If the commented added reviewers or CCs, list them explicitly.
     $meta = $this->getComment()->getMetadata();
     $m_reviewers = idx($meta, DifferentialComment::METADATA_ADDED_REVIEWERS, array());
     $m_cc = idx($meta, DifferentialComment::METADATA_ADDED_CCS, array());
     $load = array_merge($m_reviewers, $m_cc);
     if ($load) {
         $handles = id(new PhabricatorObjectHandleData($load))->loadHandles();
         if ($m_reviewers) {
             $this->addedReviewers = $this->renderHandleList($handles, $m_reviewers);
         }
         if ($m_cc) {
             $this->addedCCs = $this->renderHandleList($handles, $m_cc);
         }
     }
 }