1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-22 04:31:13 +01:00

Rename ManiphestTaskQuery::withProjects() to withAllProjects()

Summary: After D3630, make the API more clear: withAllProjects() vs withAnyProjects()

Test Plan: Loaded project page, maniphest task query, reports, filtered by project and "noproject". Grep.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1610

Differential Revision: https://secure.phabricator.com/D3631
This commit is contained in:
epriestley 2012-10-04 15:31:04 -07:00
parent 030726b144
commit 5cbc4fe7e1
5 changed files with 9 additions and 6 deletions

View file

@ -91,7 +91,7 @@ class ConduitAPI_maniphest_query_Method
$projects = $request->getValue('projectPHIDs');
if ($projects) {
$query->withProjects($projects);
$query->withAllProjects($projects);
}
$ccs = $request->getValue('ccPHIDs');

View file

@ -98,7 +98,7 @@ final class ManiphestTaskQuery extends PhabricatorQuery {
return $this;
}
public function withProjects(array $projects) {
public function withAllProjects(array $projects) {
$this->includeNoProject = false;
foreach ($projects as $k => $phid) {
if ($phid == ManiphestTaskOwner::PROJECT_NO_PROJECT) {
@ -472,7 +472,7 @@ final class ManiphestTaskQuery extends PhabricatorQuery {
$project_dao = new ManiphestTaskProject();
return qsprintf(
$conn,
'LEFT JOIN %T anyproject ON anyproject.taskPHID = task.phid',
'JOIN %T anyproject ON anyproject.taskPHID = task.phid',
$project_dao->getTableName());
}

View file

@ -406,7 +406,7 @@ final class ManiphestReportController extends ManiphestController {
$handles = $this->loadViewerHandles($phids);
$project_handle = $handles[$project_phid];
$query->withProjects($phids);
$query->withAnyProjects($phids);
}
$tasks = $query->execute();

View file

@ -425,9 +425,12 @@ final class ManiphestTaskListController extends ManiphestController {
ManiphestTaskPriority::getHighestPriority());
$query = new ManiphestTaskQuery();
$query->withProjects($project_phids);
$query->withTaskIDs($task_ids);
if ($project_phids) {
$query->withAllProjects($project_phids);
}
if ($xproject_phids) {
$query->withoutProjects($xproject_phids);
}

View file

@ -247,7 +247,7 @@ final class PhabricatorProjectProfileController
PhabricatorProjectProfile $profile) {
$query = id(new ManiphestTaskQuery())
->withProjects(array($project->getPHID()))
->withAnyProjects(array($project->getPHID()))
->withStatus(ManiphestTaskQuery::STATUS_OPEN)
->setOrderBy(ManiphestTaskQuery::ORDER_PRIORITY)
->setLimit(10)