mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Fixes broken search if no task ids created by D2771.
Summary: I forgot to handle the case where there was no task ids entered in D2771, but this corrects that issue. Test Plan: Search with no task ids... Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T1365 Differential Revision: https://secure.phabricator.com/D2773
This commit is contained in:
parent
5b6713f3c1
commit
92fac31215
1 changed files with 14 additions and 12 deletions
|
@ -662,22 +662,24 @@ final class ManiphestTaskListController extends ManiphestController {
|
||||||
$exclude_project_phids = $request->getStrList('xprojects');
|
$exclude_project_phids = $request->getStrList('xprojects');
|
||||||
$task_ids = $request->getStrList('tasks');
|
$task_ids = $request->getStrList('tasks');
|
||||||
|
|
||||||
// We only need the integer portion of each task ID, so get rid of any non-
|
if ($task_ids) {
|
||||||
// numeric elements
|
// We only need the integer portion of each task ID, so get rid of any
|
||||||
$numeric_task_ids = array();
|
// non-numeric elements
|
||||||
|
$numeric_task_ids = array();
|
||||||
|
|
||||||
foreach ($task_ids as $task_id) {
|
foreach ($task_ids as $task_id) {
|
||||||
$task_id = preg_replace('/[a-zA-Z]+/', '', $task_id);
|
$task_id = preg_replace('/[a-zA-Z]+/', '', $task_id);
|
||||||
if (!empty($task_id)) {
|
if (!empty($task_id)) {
|
||||||
$numeric_task_ids[] = $task_id;
|
$numeric_task_ids[] = $task_id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($numeric_task_ids)) {
|
if (empty($numeric_task_ids)) {
|
||||||
$numeric_task_ids = array(null);
|
$numeric_task_ids = array(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
$task_ids = $numeric_task_ids;
|
$task_ids = $numeric_task_ids;
|
||||||
|
}
|
||||||
|
|
||||||
$owner_phids = $request->getStrList('owners');
|
$owner_phids = $request->getStrList('owners');
|
||||||
$author_phids = $request->getStrList('authors');
|
$author_phids = $request->getStrList('authors');
|
||||||
|
|
Loading…
Reference in a new issue