Page MenuHomePhabricator

D9520.diff
No OneTemporary

D9520.diff

diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
--- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -565,16 +565,10 @@
$column = head(array_intersect_key($columns, $in_column_phids));
if ($column) {
$column_name = pht('(%s)', $column->getDisplayName());
- // TODO: This is really hacky but there's no cleaner way to do it
- // right now, T4022 should give us better tools for this.
- $column_href = str_replace(
- 'project/view',
- 'project/board',
- $handle->getURI());
$column_link = phutil_tag(
'a',
array(
- 'href' => $column_href,
+ 'href' => $handle->getURI().'board/',
'class' => 'maniphest-board-link',
),
$column_name);
diff --git a/src/applications/project/application/PhabricatorApplicationProject.php b/src/applications/project/application/PhabricatorApplicationProject.php
--- a/src/applications/project/application/PhabricatorApplicationProject.php
+++ b/src/applications/project/application/PhabricatorApplicationProject.php
@@ -79,6 +79,7 @@
),
'/tag/' => array(
'(?P<slug>[^/]+)/' => 'PhabricatorProjectProfileController',
+ '(?P<slug>[^/]+)/board/' => 'PhabricatorProjectBoardViewController',
),
);
}
diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
@@ -4,6 +4,7 @@
extends PhabricatorProjectBoardController {
private $id;
+ private $slug;
private $handles;
private $queryKey;
private $filter;
@@ -13,7 +14,8 @@
}
public function willProcessRequest(array $data) {
- $this->id = $data['id'];
+ $this->id = idx($data, 'id');
+ $this->slug = idx($data, 'slug');
$this->queryKey = idx($data, 'queryKey');
$this->filter = (bool)idx($data, 'filter');
}
@@ -24,12 +26,17 @@
$project = id(new PhabricatorProjectQuery())
->setViewer($viewer)
- ->needImages(true)
- ->withIDs(array($this->id))
- ->executeOne();
+ ->needImages(true);
+ if ($this->slug) {
+ $project->withSlugs(array($this->slug));
+ } else {
+ $project->withIDs(array($this->id));
+ }
+ $project = $project->executeOne();
if (!$project) {
return new Aphront404Response();
}
+
$this->setProject($project);
$columns = id(new PhabricatorProjectColumnQuery())

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 1:05 AM (14 h, 50 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6909161
Default Alt Text
D9520.diff (2 KB)

Event Timeline