Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14371546
D11848.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11848.diff
View Options
diff --git a/src/applications/project/controller/PhabricatorProjectBoardController.php b/src/applications/project/controller/PhabricatorProjectBoardController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardController.php
@@ -3,16 +3,6 @@
abstract class PhabricatorProjectBoardController
extends PhabricatorProjectController {
- private $project;
-
- protected function setProject(PhabricatorProject $project) {
- $this->project = $project;
- return $this;
- }
- protected function getProject() {
- return $this->project;
- }
-
public function buildIconNavView(PhabricatorProject $project) {
$id = $project->getID();
$nav = parent::buildIconNavView($project);
diff --git a/src/applications/project/controller/PhabricatorProjectController.php b/src/applications/project/controller/PhabricatorProjectController.php
--- a/src/applications/project/controller/PhabricatorProjectController.php
+++ b/src/applications/project/controller/PhabricatorProjectController.php
@@ -2,20 +2,32 @@
abstract class PhabricatorProjectController extends PhabricatorController {
+ private $project;
+
+ protected function setProject(PhabricatorProject $project) {
+ $this->project = $project;
+ return $this;
+ }
+
+ protected function getProject() {
+ return $this->project;
+ }
+
public function buildApplicationMenu() {
return $this->buildSideNavView(true)->getMenu();
}
public function buildSideNavView($for_app = false) {
- $viewer = $this->getViewer();
+ $project = $this->getProject();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
- $id = null;
+ $viewer = $this->getViewer();
+
if ($for_app) {
- $id = $this->getRequest()->getURIData('id');
- if ($id) {
+ if ($project) {
+ $id = $project->getID();
$nav->addFilter("profile/{$id}/", pht('Profile'));
$nav->addFilter("board/{$id}/", pht('Workboard'));
$nav->addFilter("members/{$id}/", pht('Members'));
@@ -37,6 +49,7 @@
}
public function buildIconNavView(PhabricatorProject $project) {
+ $this->setProject($project);
$viewer = $this->getViewer();
$id = $project->getID();
$picture = $project->getProfileImageURI();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 7:05 PM (20 h, 22 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6915432
Default Alt Text
D11848.diff (2 KB)
Attached To
Mode
D11848: Make Project Mobile menu more resilient
Attached
Detach File
Event Timeline
Log In to Comment