diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index facd149ae5..3adcbb6c32 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -706,7 +706,6 @@ phutil_register_library_map(array( 'ManiphestExcelFormat' => 'applications/maniphest/export/ManiphestExcelFormat.php', 'ManiphestExportController' => 'applications/maniphest/controller/ManiphestExportController.php', 'ManiphestHovercardEventListener' => 'applications/maniphest/event/ManiphestHovercardEventListener.php', - 'ManiphestLegacyTransactionQuery' => 'applications/maniphest/query/ManiphestLegacyTransactionQuery.php', 'ManiphestNameIndex' => 'applications/maniphest/storage/ManiphestNameIndex.php', 'ManiphestNameIndexEventListener' => 'applications/maniphest/event/ManiphestNameIndexEventListener.php', 'ManiphestPHIDTypeTask' => 'applications/maniphest/phid/ManiphestPHIDTypeTask.php', @@ -2823,7 +2822,6 @@ phutil_register_library_map(array( 'ManiphestTaskSearchEngine' => 'PhabricatorApplicationSearchEngine', 'ManiphestTaskStatus' => 'ManiphestConstants', 'ManiphestTaskSubscriber' => 'ManiphestDAO', - 'ManiphestTransaction' => 'PhabricatorMarkupInterface', 'ManiphestTransactionComment' => 'PhabricatorApplicationTransactionComment', 'ManiphestTransactionEditor' => 'PhabricatorEditor', 'ManiphestTransactionPreviewController' => 'ManiphestController', diff --git a/src/applications/maniphest/query/ManiphestLegacyTransactionQuery.php b/src/applications/maniphest/query/ManiphestLegacyTransactionQuery.php deleted file mode 100644 index cfe05aaf05..0000000000 --- a/src/applications/maniphest/query/ManiphestLegacyTransactionQuery.php +++ /dev/null @@ -1,53 +0,0 @@ -setViewer($viewer) - ->withObjectPHIDs(mpull($tasks, 'getPHID')) - ->needComments(true) - ->execute(); - - foreach ($xactions as $key => $xaction) { - $xactions[$key] = ManiphestTransaction::newFromModernTransaction( - $xaction); - } - - return $xactions; - } - - public static function loadByTask( - PhabricatorUser $viewer, - ManiphestTask $task) { - - return self::loadByTasks($viewer, array($task)); - } - - public static function loadByTransactionID( - PhabricatorUser $viewer, - $xaction_id) { - - $xaction = id(new ManiphestTransactionPro())->load($xaction_id); - if (!$xaction) { - return null; - } - - $xaction = id(new ManiphestTransactionQuery()) - ->setViewer($viewer) - ->withPHIDs(array($xaction->getPHID())) - ->needComments(true) - ->executeOne(); - - if ($xaction) { - $xaction = ManiphestTransaction::newFromModernTransaction($xaction); - } - - return $xaction; - } - - -} diff --git a/src/applications/maniphest/storage/ManiphestTransaction.php b/src/applications/maniphest/storage/ManiphestTransaction.php index cb0aa64cd1..19cbcb6999 100644 --- a/src/applications/maniphest/storage/ManiphestTransaction.php +++ b/src/applications/maniphest/storage/ManiphestTransaction.php @@ -1,7 +1,6 @@ proxy = clone $this->proxy; } - public static function newFromModernTransaction( - ManiphestTransactionPro $pro) { - - $obj = new ManiphestTransaction(); - $obj->proxy = $pro; - - return $obj; - } - public function getModernTransaction() { return $this->proxy; } @@ -204,88 +194,8 @@ final class ManiphestTransaction return $phids; } - public function canGroupWith($target) { - if ($target->getAuthorPHID() != $this->getAuthorPHID()) { - return false; - } - if ($target->hasComments() && $this->hasComments()) { - return false; - } - $ttime = $target->getDateCreated(); - $stime = $this->getDateCreated(); - if (abs($stime - $ttime) > 60) { - return false; - } - - if ($target->getTransactionType() == $this->getTransactionType()) { - $aux_type = PhabricatorTransactions::TYPE_CUSTOMFIELD; - if ($this->getTransactionType() == $aux_type) { - $that_key = $target->getMetadataValue('customfield:key'); - $this_key = $this->getMetadataValue('customfield:key'); - if ($that_key == $this_key) { - return false; - } - } else { - return false; - } - } - - return true; - } - public function hasComments() { return (bool)strlen(trim($this->getComments())); } - -/* -( Markup Interface )--------------------------------------------------- */ - - - /** - * @task markup - */ - public function getMarkupFieldKey($field) { - if ($this->shouldUseMarkupCache($field)) { - $id = $this->getID(); - } else { - $id = PhabricatorHash::digest($this->getMarkupText($field)); - } - return "maniphest:x:{$field}:{$id}"; - } - - - /** - * @task markup - */ - public function getMarkupText($field) { - return $this->getComments(); - } - - - /** - * @task markup - */ - public function newMarkupEngine($field) { - return PhabricatorMarkupEngine::newManiphestMarkupEngine(); - } - - - /** - * @task markup - */ - public function didMarkupText( - $field, - $output, - PhutilMarkupEngine $engine) { - return $output; - } - - - /** - * @task markup - */ - public function shouldUseMarkupCache($field) { - return (bool)$this->getID(); - } - }