mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Merge pull request #132 from floatingLomas/1365-tasks-with-ts
Strip non-integers out of task id entries
This commit is contained in:
commit
5d9896e7c5
1 changed files with 18 additions and 0 deletions
|
@ -661,6 +661,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-
|
||||||
|
// numeric elements
|
||||||
|
$numeric_task_ids = array();
|
||||||
|
|
||||||
|
foreach ($task_ids as $task_id) {
|
||||||
|
$task_id = preg_replace('/[a-zA-Z]+/', '', $task_id);
|
||||||
|
if (!empty($task_id)) {
|
||||||
|
$numeric_task_ids[] = $task_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($numeric_task_ids)) {
|
||||||
|
$numeric_task_ids = array(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
$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