Page MenuHomePhabricator

D14705.id35564.diff
No OneTemporary

D14705.id35564.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2238,7 +2238,6 @@
'PhabricatorFileImageMacro' => 'applications/macro/storage/PhabricatorFileImageMacro.php',
'PhabricatorFileImageTransform' => 'applications/files/transform/PhabricatorFileImageTransform.php',
'PhabricatorFileInfoController' => 'applications/files/controller/PhabricatorFileInfoController.php',
- 'PhabricatorFileLinkListView' => 'view/layout/PhabricatorFileLinkListView.php',
'PhabricatorFileLinkView' => 'view/layout/PhabricatorFileLinkView.php',
'PhabricatorFileListController' => 'applications/files/controller/PhabricatorFileListController.php',
'PhabricatorFileQuery' => 'applications/files/query/PhabricatorFileQuery.php',
@@ -6396,7 +6395,6 @@
),
'PhabricatorFileImageTransform' => 'PhabricatorFileTransform',
'PhabricatorFileInfoController' => 'PhabricatorFileController',
- 'PhabricatorFileLinkListView' => 'AphrontView',
'PhabricatorFileLinkView' => 'AphrontView',
'PhabricatorFileListController' => 'PhabricatorFileController',
'PhabricatorFileQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
--- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -10,10 +10,6 @@
$viewer = $this->getViewer();
$id = $request->getURIData('id');
- $e_title = null;
-
- $priority_map = ManiphestTaskPriority::getTaskPriorityMap();
-
$task = id(new ManiphestTaskQuery())
->setViewer($viewer)
->withIDs(array($id))
@@ -23,15 +19,6 @@
return new Aphront404Response();
}
- $workflow = $request->getStr('workflow');
- $parent_task = null;
- if ($workflow && is_numeric($workflow)) {
- $parent_task = id(new ManiphestTaskQuery())
- ->setViewer($viewer)
- ->withIDs(array($workflow))
- ->executeOne();
- }
-
$field_list = PhabricatorCustomField::getObjectFields(
$task,
PhabricatorCustomField::ROLE_VIEW);
@@ -65,53 +52,13 @@
}
$phids[$task->getAuthorPHID()] = true;
- $attached = $task->getAttached();
- foreach ($attached as $type => $list) {
- foreach ($list as $phid => $info) {
- $phids[$phid] = true;
- }
- }
-
- if ($parent_task) {
- $phids[$parent_task->getPHID()] = true;
- }
-
$phids = array_keys($phids);
$handles = $viewer->loadHandles($phids);
- $info_view = null;
- if ($parent_task) {
- $info_view = new PHUIInfoView();
- $info_view->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
- $info_view->addButton(
- id(new PHUIButtonView())
- ->setTag('a')
- ->setHref('/maniphest/task/create/?parent='.$parent_task->getID())
- ->setText(pht('Create Another Subtask')));
-
- $info_view->appendChild(hsprintf(
- 'Created a subtask of <strong>%s</strong>.',
- $handles->renderHandle($parent_task->getPHID())));
- } else if ($workflow == 'create') {
- $info_view = new PHUIInfoView();
- $info_view->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
- $info_view->addButton(
- id(new PHUIButtonView())
- ->setTag('a')
- ->setHref('/maniphest/task/create/?template='.$task->getID())
- ->setText(pht('Similar Task')));
- $info_view->addButton(
- id(new PHUIButtonView())
- ->setTag('a')
- ->setHref('/maniphest/task/create/')
- ->setText(pht('Empty Task')));
- $info_view->appendChild(pht('New task created. Create another?'));
- }
-
- $engine = new PhabricatorMarkupEngine();
- $engine->setViewer($viewer);
- $engine->setContextObject($task);
- $engine->addObject($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION);
+ $engine = id(new PhabricatorMarkupEngine())
+ ->setViewer($viewer)
+ ->setContextObject($task)
+ ->addObject($task, ManiphestTask::MARKUP_FIELD_DESCRIPTION);
$timeline = $this->buildTransactionTimeline(
$task,
@@ -155,7 +102,6 @@
))
->appendChild(
array(
- $info_view,
$object_box,
$timeline,
$comment_view,
@@ -325,30 +271,6 @@
phutil_implode_html(phutil_tag('br'), $revisions_commits));
}
- $attached = $task->getAttached();
- if (!is_array($attached)) {
- $attached = array();
- }
-
- $file_infos = idx($attached, PhabricatorFileFilePHIDType::TYPECONST);
- if ($file_infos) {
- $file_phids = array_keys($file_infos);
-
- // TODO: These should probably be handles or something; clean this up
- // as we sort out file attachments.
- $files = id(new PhabricatorFileQuery())
- ->setViewer($viewer)
- ->withPHIDs($file_phids)
- ->execute();
-
- $file_view = new PhabricatorFileLinkListView();
- $file_view->setFiles($files);
-
- $view->addProperty(
- pht('Files'),
- $file_view->render());
- }
-
$view->invokeWillRenderEvent();
$field_list->appendFieldsToPropertyList(
diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php
--- a/src/applications/maniphest/storage/ManiphestTask.php
+++ b/src/applications/maniphest/storage/ManiphestTask.php
@@ -32,7 +32,6 @@
protected $viewPolicy = PhabricatorPolicies::POLICY_USER;
protected $editPolicy = PhabricatorPolicies::POLICY_USER;
- protected $attached = array();
protected $projectPHIDs = array();
protected $ownerOrdering;
@@ -43,6 +42,9 @@
private $customFields = self::ATTACHABLE;
private $edgeProjectPHIDs = self::ATTACHABLE;
+ // TODO: This field is unused and should eventually be removed.
+ protected $attached = array();
+
public static function initializeNewTask(PhabricatorUser $actor) {
$app = id(new PhabricatorApplicationQuery())
->setViewer($actor)
diff --git a/src/view/layout/PhabricatorFileLinkListView.php b/src/view/layout/PhabricatorFileLinkListView.php
deleted file mode 100644
--- a/src/view/layout/PhabricatorFileLinkListView.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-final class PhabricatorFileLinkListView extends AphrontView {
- private $files;
-
- public function setFiles(array $files) {
- assert_instances_of($files, 'PhabricatorFile');
- $this->files = $files;
- return $this;
- }
- private function getFiles() {
- return $this->files;
- }
-
- public function render() {
- $files = $this->getFiles();
- if (!$files) {
- return '';
- }
-
- require_celerity_resource('phabricator-remarkup-css');
-
- $file_links = array();
- foreach ($this->getFiles() as $file) {
- $view = id(new PhabricatorFileLinkView())
- ->setFilePHID($file->getPHID())
- ->setFileName($file->getName())
- ->setFileDownloadURI($file->getDownloadURI())
- ->setFileViewURI($file->getBestURI())
- ->setFileViewable($file->isViewableImage());
- $file_links[] = $view->render();
- }
-
- return phutil_implode_html(phutil_tag('br'), $file_links);
- }
-}

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 25, 8:10 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7386046
Default Alt Text
D14705.id35564.diff (7 KB)

Event Timeline