Changeset View
Changeset View
Standalone View
Standalone View
src/applications/home/controller/PhabricatorHomeMainController.php
| Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | if (!$user->isLoggedIn()) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| if ($projects) { | if ($projects) { | ||||
| $task_query = id(new ManiphestTaskQuery()) | $task_query = id(new ManiphestTaskQuery()) | ||||
| ->setViewer($user) | ->setViewer($user) | ||||
| ->withStatuses(ManiphestTaskStatus::getOpenStatusConstants()) | ->withStatuses(ManiphestTaskStatus::getOpenStatusConstants()) | ||||
| ->withPriorities(array($needs_triage)) | ->withPriorities(array($needs_triage)) | ||||
| ->withAnyProjects(mpull($projects, 'getPHID')) | ->withEdgeLogicPHIDs( | ||||
| PhabricatorProjectObjectHasProjectEdgeType::EDGECONST, | |||||
| PhabricatorQueryConstraint::OPERATOR_OR, | |||||
| mpull($projects, 'getPHID')) | |||||
| ->needProjectPHIDs(true) | ->needProjectPHIDs(true) | ||||
epriestley: In particular, this is a little bit cumbersome compared to the old API, but we only have about… | |||||
| ->setLimit(10); | ->setLimit(10); | ||||
| $tasks = $task_query->execute(); | $tasks = $task_query->execute(); | ||||
| } else { | } else { | ||||
| $tasks = array(); | $tasks = array(); | ||||
| } | } | ||||
| if (!$tasks) { | if (!$tasks) { | ||||
| return $this->renderMiniPanel( | return $this->renderMiniPanel( | ||||
| ▲ Show 20 Lines • Show All 232 Lines • Show Last 20 Lines | |||||
In particular, this is a little bit cumbersome compared to the old API, but we only have about 6 callsites and half of them will vanish eventually, so it didn't seem worthwhile to define some convenience wrapper method to specify the project edge constant and/or operator for you.