mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Throw a proper 404 page when accessing a task which does not exist.
This commit is contained in:
parent
b266b570d8
commit
793df0cfc5
2 changed files with 4 additions and 0 deletions
|
@ -34,6 +34,9 @@ class ManiphestTaskDetailController extends ManiphestController {
|
||||||
$priority_map = ManiphestTaskPriority::getTaskPriorityMap();
|
$priority_map = ManiphestTaskPriority::getTaskPriorityMap();
|
||||||
|
|
||||||
$task = id(new ManiphestTask())->load($this->id);
|
$task = id(new ManiphestTask())->load($this->id);
|
||||||
|
if (!$task) {
|
||||||
|
return new Aphront404Response();
|
||||||
|
}
|
||||||
|
|
||||||
$transactions = id(new ManiphestTransaction())->loadAllWhere(
|
$transactions = id(new ManiphestTransaction())->loadAllWhere(
|
||||||
'taskID = %d',
|
'taskID = %d',
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
phutil_require_module('phabricator', 'aphront/response/404');
|
||||||
phutil_require_module('phabricator', 'applications/differential/parser/markup');
|
phutil_require_module('phabricator', 'applications/differential/parser/markup');
|
||||||
phutil_require_module('phabricator', 'applications/maniphest/constants/priority');
|
phutil_require_module('phabricator', 'applications/maniphest/constants/priority');
|
||||||
phutil_require_module('phabricator', 'applications/maniphest/constants/status');
|
phutil_require_module('phabricator', 'applications/maniphest/constants/status');
|
||||||
|
|
Loading…
Reference in a new issue